@@ -237,8 +237,8 @@ discard block |
||
237 | 237 | $totp = new TOTP( |
238 | 238 | $this->email, |
239 | 239 | $encodedSecret, |
240 | - 30, // 30 second window |
|
241 | - 'sha256', // SHA256 for the hashing algorithm |
|
240 | + 30, // 30 second window |
|
241 | + 'sha256', // SHA256 for the hashing algorithm |
|
242 | 242 | 6 // 6 digits |
243 | 243 | ); |
244 | 244 | |
@@ -292,8 +292,8 @@ discard block |
||
292 | 292 | $totp = new TOTP( |
293 | 293 | $this->email, |
294 | 294 | $this->otp_secret, |
295 | - 30, // 30 second window |
|
296 | - 'sha256', // SHA256 for the hashing algorithm |
|
295 | + 30, // 30 second window |
|
296 | + 'sha256', // SHA256 for the hashing algorithm |
|
297 | 297 | 6 // 6 digits |
298 | 298 | ); |
299 | 299 |
@@ -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) { |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | |
30 | 30 | // Pull the exception |
31 | 31 | $exception = Yii::$app->errorHandler->exception; |
32 | - if ($exception && is_subclass_of($exception, 'yii\web\HttpException') || get_class($exception) === 'yii\web\HttpException' ) { |
|
32 | + if ($exception && is_subclass_of($exception, 'yii\web\HttpException') || get_class($exception) === 'yii\web\HttpException') { |
|
33 | 33 | $copy = $response->data; |
34 | 34 | $response->data = null; |
35 | 35 | |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | $response->data['status'] = $status; |
65 | 65 | |
66 | 66 | if ($response->data['data'] === [] || $response->data['data'] === null) { |
67 | - $response->data['data'] = null; |
|
67 | + $response->data['data'] = null; |
|
68 | 68 | } |
69 | 69 | } |
70 | 70 |
@@ -48,7 +48,7 @@ |
||
48 | 48 | $token->user_id = $userId; |
49 | 49 | $token->access_token = \str_replace('=', '', Base32::encode(\random_bytes(32))); |
50 | 50 | $token->refresh_token = \str_replace('=', '', Base32::encode(\random_bytes(32))); |
51 | - $token->ikm = \base64_encode(\random_bytes(32)); |
|
51 | + $token->ikm = \base64_encode(\random_bytes(32)); |
|
52 | 52 | $token->expires_at = strtotime(self::TOKEN_EXPIRATION_TIME); |
53 | 53 | |
54 | 54 | if ($token->save()) { |