Skip to content

Commit

Permalink
fix: Remove redundant middleware insertion (#415)
Browse files Browse the repository at this point in the history
  • Loading branch information
evansims authored Jun 21, 2023
1 parent e556649 commit eaebb39
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
2 changes: 0 additions & 2 deletions src/Middleware/GuardMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

namespace Auth0\Laravel\Middleware;

use Illuminate\Http\Request;

/**
* Assigns a specific guard to the request.
*
Expand Down
6 changes: 0 additions & 6 deletions src/ServiceProviderAbstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
use Illuminate\Support\Facades\Route;
use Illuminate\Support\ServiceProvider;

use function defined;
use function is_string;

/**
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit eaebb39

Please sign in to comment.