@@ -92,7 +92,7 @@ |
||
92 | 92 | private function isHMACSignatureValid($accessToken, $ikm, $salt, $request, $hmac = null) |
93 | 93 | { |
94 | 94 | static $selfHMAC = null; |
95 | - static $hkdf = null; |
|
95 | + static $hkdf = null; |
|
96 | 96 | |
97 | 97 | // Null check the HMAC string |
98 | 98 | if (empty($hmac) || $hmac === null) { |
@@ -247,8 +247,8 @@ discard block |
||
247 | 247 | $totp = new TOTP( |
248 | 248 | $this->username, |
249 | 249 | $encodedSecret, |
250 | - 30, // 30 second window |
|
251 | - 'sha256', // SHA256 for the hashing algorithm |
|
250 | + 30, // 30 second window |
|
251 | + 'sha256', // SHA256 for the hashing algorithm |
|
252 | 252 | 6 // 6 digits |
253 | 253 | ); |
254 | 254 | |
@@ -302,8 +302,8 @@ discard block |
||
302 | 302 | $totp = new TOTP( |
303 | 303 | $this->username, |
304 | 304 | $this->otp_secret, |
305 | - 30, // 30 second window |
|
306 | - 'sha256', // SHA256 for the hashing algorithm |
|
305 | + 30, // 30 second window |
|
306 | + 'sha256', // SHA256 for the hashing algorithm |
|
307 | 307 | 6 // 6 digits |
308 | 308 | ); |
309 | 309 |
@@ -59,7 +59,7 @@ |
||
59 | 59 | $response->data['status'] = $status; |
60 | 60 | |
61 | 61 | if ($response->data['data'] === [] || $response->data['data'] === null) { |
62 | - $response->data['data'] = null; |
|
62 | + $response->data['data'] = null; |
|
63 | 63 | } |
64 | 64 | } |
65 | 65 |
@@ -72,7 +72,7 @@ |
||
72 | 72 | $token->user_id = $userId; |
73 | 73 | $token->access_token = \str_replace('=', '', Base32::encode(\random_bytes(32))); |
74 | 74 | $token->refresh_token = \str_replace('=', '', Base32::encode(\random_bytes(32))); |
75 | - $token->ikm = \base64_encode(\random_bytes(32)); |
|
75 | + $token->ikm = \base64_encode(\random_bytes(32)); |
|
76 | 76 | $token->secret_sign_kp = \base64_encode(sodium_crypto_sign_secretkey($signKp)); |
77 | 77 | $token->expires_at = \strtotime(static::TOKEN_EXPIRATION_TIME); |
78 | 78 |