diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index 50516ef2..0a453175 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -46,7 +46,7 @@ class Kernel extends HttpKernel * @var array */ protected $routeMiddleware = [ - 'auth' => \App\Http\Middleware\Authenticate::class, + 'auth' => \Illuminate\Http\Middleware\Authenticate::class, 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, 'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class, 'can' => \Illuminate\Foundation\Http\Middleware\Authorize::class, diff --git a/app/Http/Middleware/Authenticate.php b/app/Http/Middleware/Authenticate.php deleted file mode 100644 index 23881e7a..00000000 --- a/app/Http/Middleware/Authenticate.php +++ /dev/null @@ -1,52 +0,0 @@ -authenticate($guards); - - return $next($request); - } - - /** - * Determine if the user is logged in to any of the given guards. - * - * @param array $guards - * @return void - * - * @throws \Illuminate\Auth\AuthenticationException - */ - protected function authenticate(array $guards) - { - if (count($guards) <= 1) { - Auth::guard(array_first($guards))->authenticate(); - - return Auth::shouldUse($guard); - } - - foreach ($guards as $guard) { - if (Auth::guard($guard)->check()) { - return Auth::shouldUse($guard); - } - } - - throw new AuthenticationException; - } -}