Update: 2026-06-16 02:52:06
This commit is contained in:
@@ -90,7 +90,14 @@ try {
|
||||
'jti' => bin2hex(random_bytes(16)),
|
||||
];
|
||||
|
||||
$secretKey = trim(file_get_contents('/home/siro-api/.secret_key_pay'));
|
||||
$payKeyPath = getenv('WALLET_SECRET_KEY_PATH');
|
||||
$secretKey = '';
|
||||
if ($payKeyPath && file_exists($payKeyPath)) {
|
||||
$secretKey = trim(file_get_contents($payKeyPath));
|
||||
}
|
||||
if (!$secretKey) {
|
||||
$secretKey = getenv('WALLET_SECRET_KEY') ?: '';
|
||||
}
|
||||
$jwt = Firebase\JWT\JWT::encode($payload, $secretKey, 'HS256');
|
||||
|
||||
$hmac = hash_hmac('sha256', $id, getenv('SECRET_KEY_HMAC'));
|
||||
|
||||
Reference in New Issue
Block a user