@@ -38,7 +38,7 @@ |
||
| 38 | 38 | * |
| 39 | 39 | * @todo Move to class specialized in check auth configs. |
| 40 | 40 | * @param \Illuminate\Contracts\Auth\Authenticatable $user |
| 41 | - * @return string|null |
|
| 41 | + * @return string |
|
| 42 | 42 | */ |
| 43 | 43 | public static function getUserProvider(Authenticatable $user) |
| 44 | 44 | { |
@@ -2,10 +2,10 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace SMartins\PassportMultiauth; |
| 4 | 4 | |
| 5 | -use Mockery; |
|
| 6 | -use Laravel\Passport\Token; |
|
| 7 | -use Illuminate\Support\Facades\App; |
|
| 8 | 5 | use Illuminate\Contracts\Auth\Authenticatable; |
| 6 | +use Illuminate\Support\Facades\App; |
|
| 7 | +use Laravel\Passport\Token; |
|
| 8 | +use Mockery; |
|
| 9 | 9 | |
| 10 | 10 | class PassportMultiauth |
| 11 | 11 | { |
@@ -93,7 +93,6 @@ |
||
| 93 | 93 | * Check if user acting has the required guards and scopes on request. |
| 94 | 94 | * |
| 95 | 95 | * @param \Illuminate\Foundation\Auth\User $user |
| 96 | - * @param \Illuminate\Http\Request $request |
|
| 97 | 96 | * @return bool |
| 98 | 97 | */ |
| 99 | 98 | public function canBeAuthenticated(Authenticatable $user, $guards) |
@@ -3,17 +3,17 @@ |
||
| 3 | 3 | namespace SMartins\PassportMultiauth\Http\Middleware; |
| 4 | 4 | |
| 5 | 5 | use Closure; |
| 6 | -use Illuminate\Http\Request; |
|
| 7 | -use League\OAuth2\Server\ResourceServer; |
|
| 8 | 6 | use Illuminate\Auth\AuthenticationException; |
| 9 | 7 | use Illuminate\Auth\Middleware\Authenticate; |
| 10 | -use Illuminate\Contracts\Auth\Factory as Auth; |
|
| 11 | 8 | use Illuminate\Contracts\Auth\Authenticatable; |
| 12 | -use SMartins\PassportMultiauth\Provider as Token; |
|
| 9 | +use Illuminate\Contracts\Auth\Factory as Auth; |
|
| 10 | +use Illuminate\Http\Request; |
|
| 11 | +use League\OAuth2\Server\Exception\OAuthServerException; |
|
| 12 | +use League\OAuth2\Server\ResourceServer; |
|
| 13 | +use SMartins\PassportMultiauth\Guards\GuardChecker; |
|
| 13 | 14 | use SMartins\PassportMultiauth\PassportMultiauth; |
| 15 | +use SMartins\PassportMultiauth\Provider as Token; |
|
| 14 | 16 | use SMartins\PassportMultiauth\ProviderRepository; |
| 15 | -use SMartins\PassportMultiauth\Guards\GuardChecker; |
|
| 16 | -use League\OAuth2\Server\Exception\OAuthServerException; |
|
| 17 | 17 | use Symfony\Bridge\PsrHttpMessage\Factory\DiactorosFactory; |
| 18 | 18 | |
| 19 | 19 | class MultiAuthenticate extends Authenticate |