|
2 | 2 |
|
3 | 3 | namespace Auth0\Login; |
4 | 4 |
|
5 | | -use Auth0\SDK\API\Helpers\State\SessionStateHandler; |
6 | 5 | use Auth0\SDK\API\Helpers\State\StateHandler; |
7 | 6 | use Auth0\SDK\Auth0; |
8 | 7 | use Auth0\SDK\Helpers\Cache\CacheHandler; |
9 | 8 | use Auth0\SDK\JWTVerifier; |
10 | 9 | use Auth0\SDK\Store\StoreInterface; |
11 | 10 | use Config; |
12 | | -use Illuminate\Contracts\Config\Repository; |
13 | 11 | use Illuminate\Contracts\Container\BindingResolutionException; |
14 | 12 | use Illuminate\Http\RedirectResponse; |
15 | 13 |
|
@@ -37,22 +35,11 @@ class Auth0Service |
37 | 35 | * @throws \Auth0\SDK\Exception\CoreException |
38 | 36 | */ |
39 | 37 | public function __construct( |
40 | | - array $auth0Config = null, |
41 | | - StoreInterface $sessionStorage = null, |
42 | | - StateHandler $stateHandler = null |
| 38 | + array $auth0Config, |
| 39 | + StoreInterface $sessionStorage, |
| 40 | + StateHandler $stateHandler |
43 | 41 | ) |
44 | 42 | { |
45 | | - // Backwards compatible fallbacks |
46 | | - if (!$auth0Config instanceof Repository && !is_array($auth0Config)) { |
47 | | - $auth0Config = config('laravel-auth0'); |
48 | | - } |
49 | | - if (!$sessionStorage instanceof StoreInterface) { |
50 | | - $sessionStorage = new LaravelSessionStore(); |
51 | | - } |
52 | | - if (!$stateHandler instanceof StateHandler) { |
53 | | - $stateHandler = new SessionStateHandler($sessionStorage); |
54 | | - } |
55 | | - |
56 | 43 | $auth0Config['store'] = $sessionStorage; |
57 | 44 | $auth0Config['state_handler'] = $stateHandler; |
58 | 45 | $this->auth0 = new Auth0($auth0Config); |
|
0 commit comments