@@ -224,7 +224,7 @@ |
||
224 | 224 | |
225 | 225 | /** |
226 | 226 | * Provisions TOTP for the account |
227 | - * @return boolean|string |
|
227 | + * @return false|string |
|
228 | 228 | */ |
229 | 229 | public function provisionOTP() |
230 | 230 | { |
@@ -4,7 +4,6 @@ |
||
4 | 4 | |
5 | 5 | use Base32\Base32; |
6 | 6 | use OTPHP\TOTP; |
7 | - |
|
8 | 7 | use yii\behaviors\TimestampBehavior; |
9 | 8 | use yii\db\ActiveRecord; |
10 | 9 | use yii\filters\RateLimitInterface; |
@@ -5,7 +5,6 @@ |
||
5 | 5 | use yrc\rest\Action as RestAction; |
6 | 6 | use yrc\api\models\TokenKeyPair; |
7 | 7 | use Sodium; |
8 | -use Yii; |
|
9 | 8 | |
10 | 9 | class OneTimeKeyAction extends RestAction |
11 | 10 | { |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | } |
48 | 48 | |
49 | 49 | /** |
50 | - * @return \Sodium\crypto_box_publickey |
|
50 | + * @return string |
|
51 | 51 | */ |
52 | 52 | public function getBoxPublicKey() |
53 | 53 | { |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | } |
56 | 56 | |
57 | 57 | /** |
58 | - * @return \Sodium\crypto_sign_publickey |
|
58 | + * @return string |
|
59 | 59 | */ |
60 | 60 | public function getSignPublicKey() |
61 | 61 | { |
@@ -9,9 +9,7 @@ |
||
9 | 9 | use yii\filters\ContentNegotiator; |
10 | 10 | use yii\web\HttpException; |
11 | 11 | use yrc\web\Response; |
12 | - |
|
13 | 12 | use Yii; |
14 | - |
|
15 | 13 | use ReflectionClass; |
16 | 14 | use ReflectionMethod; |
17 | 15 |
@@ -5,7 +5,6 @@ |
||
5 | 5 | use yii\helpers\Json; |
6 | 6 | use yii\web\JsonParser; |
7 | 7 | use yrc\api\models\TokenKeyPair; |
8 | - |
|
9 | 8 | use yii\web\BadRequestHttpException; |
10 | 9 | use Yii; |
11 | 10 |
@@ -62,7 +62,7 @@ |
||
62 | 62 | $token->user_id = $userId; |
63 | 63 | $token->access_token = \str_replace('=', '', Base32::encode(\random_bytes(32))); |
64 | 64 | $token->refresh_token = \str_replace('=', '', Base32::encode(\random_bytes(32))); |
65 | - $token->ikm = \base64_encode(\random_bytes(32)); |
|
65 | + $token->ikm = \base64_encode(\random_bytes(32)); |
|
66 | 66 | $token->expires_at = \strtotime(static::TOKEN_EXPIRATION_TIME); |
67 | 67 | |
68 | 68 | // Prevent encrypted sessions from being downgraded |