Commit 93b9415c authored by Taylor Otwell's avatar Taylor Otwell

Update middleware.

parent 5ecc099e
...@@ -11,13 +11,13 @@ class Kernel extends HttpKernel { ...@@ -11,13 +11,13 @@ class Kernel extends HttpKernel {
* @var array * @var array
*/ */
protected $middleware = [ protected $middleware = [
'App\Http\Middleware\MaintenanceMiddleware', 'App\Http\Middleware\UnderMaintenance',
'Illuminate\Cookie\Middleware\Guard', 'Illuminate\Cookie\Middleware\EncryptCookies',
'Illuminate\Cookie\Middleware\Queue', 'Illuminate\Cookie\Middleware\AddQueuedCookiesToRequest',
'Illuminate\Session\Middleware\Reader', 'Illuminate\Session\Middleware\ReadSession',
'Illuminate\Session\Middleware\Writer', 'Illuminate\Session\Middleware\WriteSession',
'Illuminate\View\Middleware\ErrorBinder', 'Illuminate\View\Middleware\ShareErrorsFromSession',
'App\Http\Middleware\CsrfMiddleware', 'App\Http\Middleware\ValidateCsrfToken',
]; ];
/** /**
......
...@@ -5,7 +5,7 @@ use Illuminate\Contracts\Auth\Guard; ...@@ -5,7 +5,7 @@ use Illuminate\Contracts\Auth\Guard;
use Illuminate\Http\RedirectResponse; use Illuminate\Http\RedirectResponse;
use Illuminate\Contracts\Routing\Middleware; use Illuminate\Contracts\Routing\Middleware;
class GuestMiddleware implements Middleware { class IsGuest implements Middleware {
/** /**
* The Guard implementation. * The Guard implementation.
......
...@@ -5,7 +5,7 @@ use Illuminate\Contracts\Auth\Guard; ...@@ -5,7 +5,7 @@ use Illuminate\Contracts\Auth\Guard;
use Illuminate\Contracts\Routing\Middleware; use Illuminate\Contracts\Routing\Middleware;
use Illuminate\Contracts\Routing\ResponseFactory; use Illuminate\Contracts\Routing\ResponseFactory;
class AuthMiddleware implements Middleware { class LoggedIn implements Middleware {
/** /**
* The Guard implementation. * The Guard implementation.
......
...@@ -4,7 +4,7 @@ use Closure; ...@@ -4,7 +4,7 @@ use Closure;
use Illuminate\Contracts\Auth\Guard; use Illuminate\Contracts\Auth\Guard;
use Illuminate\Contracts\Routing\Middleware; use Illuminate\Contracts\Routing\Middleware;
class BasicAuthMiddleware implements Middleware { class LoggedInWithBasicAuth implements Middleware {
/** /**
* The Guard implementation. * The Guard implementation.
......
...@@ -5,7 +5,7 @@ use Illuminate\Http\Response; ...@@ -5,7 +5,7 @@ use Illuminate\Http\Response;
use Illuminate\Contracts\Routing\Middleware; use Illuminate\Contracts\Routing\Middleware;
use Illuminate\Contracts\Foundation\Application; use Illuminate\Contracts\Foundation\Application;
class MaintenanceMiddleware implements Middleware { class UnderMaintenance implements Middleware {
/** /**
* The application implementation. * The application implementation.
......
...@@ -4,7 +4,7 @@ use Closure; ...@@ -4,7 +4,7 @@ use Closure;
use Illuminate\Contracts\Routing\Middleware; use Illuminate\Contracts\Routing\Middleware;
use Illuminate\Session\TokenMismatchException; use Illuminate\Session\TokenMismatchException;
class CsrfMiddleware implements Middleware { class ValidateCsrfToken implements Middleware {
/** /**
* Handle an incoming request. * Handle an incoming request.
...@@ -12,7 +12,7 @@ class CsrfMiddleware implements Middleware { ...@@ -12,7 +12,7 @@ class CsrfMiddleware implements Middleware {
* @param \Illuminate\Http\Request $request * @param \Illuminate\Http\Request $request
* @param \Closure $next * @param \Closure $next
* @return mixed * @return mixed
* *
* @throws TokenMismatchException * @throws TokenMismatchException
*/ */
public function handle($request, Closure $next) public function handle($request, Closure $next)
......
...@@ -22,10 +22,10 @@ class RouteServiceProvider extends ServiceProvider { ...@@ -22,10 +22,10 @@ class RouteServiceProvider extends ServiceProvider {
* @var array * @var array
*/ */
protected $middleware = [ protected $middleware = [
'auth' => 'App\Http\Middleware\AuthMiddleware', 'auth' => 'App\Http\Middleware\LoggedIn',
'auth.basic' => 'App\Http\Middleware\BasicAuthMiddleware', 'auth.basic' => 'App\Http\Middleware\LoggedInWithBasicAuth',
'csrf' => 'App\Http\Middleware\CsrfMiddleware', 'csrf' => 'App\Http\Middleware\VerifyCsrfToken',
'guest' => 'App\Http\Middleware\GuestMiddleware', 'guest' => 'App\Http\Middleware\IsGuest',
]; ];
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment