Browse Source

[7.x] Remove register in auth provider (#5182)

* Remove register in auth provider

* Update AuthServiceProvider.php

* Update Kernel.php
Graham Campbell 4 years ago
parent
commit
583d1fa773
2 changed files with 1 additions and 13 deletions
  1. 1 1
      app/Http/Kernel.php
  2. 0 12
      app/Providers/AuthServiceProvider.php

+ 1 - 1
app/Http/Kernel.php

@@ -51,7 +51,7 @@ class Kernel extends HttpKernel
      * @var array
      */
     protected $routeMiddleware = [
-        'auth' => \Illuminate\Contracts\Auth\Middleware\AuthenticatesRequests::class,
+        'auth' => \App\Http\Middleware\Authenticate::class,
         'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
         'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,
         'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,

+ 0 - 12
app/Providers/AuthServiceProvider.php

@@ -2,8 +2,6 @@
 
 namespace App\Providers;
 
-use App\Http\Middleware\Authenticate;
-use Illuminate\Contracts\Auth\Middleware\AuthenticatesRequests;
 use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
 use Illuminate\Support\Facades\Gate;
 
@@ -18,16 +16,6 @@ class AuthServiceProvider extends ServiceProvider
         // 'App\Model' => 'App\Policies\ModelPolicy',
     ];
 
-    /**
-     * Register any application services.
-     *
-     * @return void
-     */
-    public function register()
-    {
-        $this->app->bind(AuthenticatesRequests::class, Authenticate::class);
-    }
-
     /**
      * Register any authentication / authorization services.
      *