Switched to purely reading secret_key_pay via environment variables
This commit is contained in:
@@ -77,9 +77,8 @@ try {
|
|||||||
'jti' => bin2hex(random_bytes(16)),
|
'jti' => bin2hex(random_bytes(16)),
|
||||||
];
|
];
|
||||||
|
|
||||||
$secretKey = file_exists('/home/intaleq-api/.secret_key_pay')
|
$keyPathPay = getenv('SECRET_KEY_PAY_PATH');
|
||||||
? trim(file_get_contents('/home/intaleq-api/.secret_key_pay'))
|
$secretKey = trim(file_get_contents($keyPathPay));
|
||||||
: trim(file_get_contents('/home/intaleq-api/.secret_key'));
|
|
||||||
$jwt = Firebase\JWT\JWT::encode($payload, $secretKey, 'HS256');
|
$jwt = Firebase\JWT\JWT::encode($payload, $secretKey, 'HS256');
|
||||||
|
|
||||||
$hmac = hash_hmac('sha256', $id, getenv('SECRET_KEY_HMAC'));
|
$hmac = hash_hmac('sha256', $id, getenv('SECRET_KEY_HMAC'));
|
||||||
|
|||||||
Reference in New Issue
Block a user