diff --git a/src/Middleware/GuardMiddleware.php b/src/Middleware/GuardMiddleware.php index 6cc96e70..d5f8be60 100644 --- a/src/Middleware/GuardMiddleware.php +++ b/src/Middleware/GuardMiddleware.php @@ -4,8 +4,6 @@ namespace Auth0\Laravel\Middleware; -use Illuminate\Http\Request; - /** * Assigns a specific guard to the request. * diff --git a/src/ServiceProviderAbstract.php b/src/ServiceProviderAbstract.php index 9947a573..3d444f43 100644 --- a/src/ServiceProviderAbstract.php +++ b/src/ServiceProviderAbstract.php @@ -19,7 +19,6 @@ use Illuminate\Support\Facades\Route; use Illuminate\Support\ServiceProvider; -use function defined; use function is_string; /** @@ -208,11 +207,6 @@ final public function registerMiddleware( /** * @var \Illuminate\Foundation\Http\Kernel $kernel */ - if (! defined('AUTH0_LARAVEL_RUNNING_TESTS')) { - $kernel->pushMiddleware(AuthenticatorMiddleware::class); - $kernel->pushMiddleware(AuthenticatorMiddleware::class); - } - $kernel->appendMiddlewareToGroup('web', AuthenticatorMiddleware::class); $kernel->appendMiddlewareToGroup('api', AuthorizerMiddleware::class);