@@ -7,9 +7,7 @@ |
||
7 | 7 | |
8 | 8 | use Canis\Lumen\Jwt\Token; |
9 | 9 | use Canis\Lumen\Jwt\Contracts\Processor as ProcessorContract; |
10 | -use Canis\Lumen\Jwt\Exceptions\InvalidTokenException; |
|
11 | 10 | use Lcobucci\JWT\ValidationData; |
12 | -use Lcobucci\JWT\Builder; |
|
13 | 11 | use Lcobucci\JWT\Signer\Hmac\Sha256; |
14 | 12 | use Lcobucci\JWT\Parser; |
15 | 13 |
@@ -42,6 +42,6 @@ |
||
42 | 42 | if (!$token->validate($data)) { |
43 | 43 | return false; |
44 | 44 | } |
45 | - return new Token((string)$token, $token->getClaims()); |
|
45 | + return new Token((string) $token, $token->getClaims()); |
|
46 | 46 | } |
47 | 47 | } |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | /** |
92 | 92 | * Returns a token generator from the adapter factory |
93 | 93 | * |
94 | - * @return GeneratorCotnract |
|
94 | + * @return GeneratorContract |
|
95 | 95 | */ |
96 | 96 | protected function getGenerator() |
97 | 97 | { |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | /** |
159 | 159 | * Determine if the user matches the credentials. |
160 | 160 | * |
161 | - * @param mixed $user |
|
161 | + * @param Authenticatable|null $user |
|
162 | 162 | * @param array $credentials |
163 | 163 | * @return bool |
164 | 164 | */ |
@@ -5,17 +5,14 @@ |
||
5 | 5 | */ |
6 | 6 | namespace Canis\Lumen\Jwt; |
7 | 7 | |
8 | -use Auth; |
|
9 | 8 | use Illuminate\Http\Request; |
10 | 9 | use Illuminate\Support\Str; |
11 | 10 | use Illuminate\Auth\GuardHelpers; |
12 | 11 | use Illuminate\Contracts\Auth\UserProvider; |
13 | 12 | use Illuminate\Contracts\Auth\Guard as GaurdContract; |
14 | -use Illuminate\Contracts\Auth\Authenticatable; |
|
15 | 13 | use Canis\Lumen\Jwt\Exceptions\InvalidTokenException; |
16 | 14 | use Canis\Lumen\Jwt\Exceptions\InvalidAdapterException; |
17 | 15 | use Canis\Lumen\Jwt\Contracts\AdapterFactory as AdapterFactoryContract; |
18 | -use Canis\Lumen\Jwt\Contracts\Generator as GeneratorContract; |
|
19 | 16 | use Canis\Lumen\Jwt\Contracts\Processor as ProcessorContract; |
20 | 17 | |
21 | 18 | abstract class BaseGuard |
@@ -38,7 +38,7 @@ |
||
38 | 38 | $builder->setId(substr(hash('sha256', serialize($claims) . openssl_random_pseudo_bytes(20)), 0, 16), true); |
39 | 39 | $builder->sign($signer, $this->config['secret']); |
40 | 40 | $token = $builder->getToken(); |
41 | - return new Token((string)$token, $token->getClaims()); |
|
41 | + return new Token((string) $token, $token->getClaims()); |
|
42 | 42 | } |
43 | 43 | |
44 | 44 | /** |