[ EncryptCookies::class, AddQueuedCookiesToResponse::class, StartSession::class, ShareErrorsFromSession::class, VerifyCsrfToken::class, ], // MUST NOT be logged in. Does not care about 2FA or confirmation. 'user-not-logged-in' => [ EncryptCookies::class, AddQueuedCookiesToResponse::class, StartSession::class, ShareErrorsFromSession::class, VerifyCsrfToken::class, RedirectIfAuthenticated::class, ], // MUST be logged in. // MUST NOT have 2FA // don't care about confirmation: 'user-logged-in-no-2fa' => [ EncryptCookies::class, AddQueuedCookiesToResponse::class, StartSession::class, ShareErrorsFromSession::class, VerifyCsrfToken::class, Authenticate::class, RedirectIfTwoFactorAuthenticated::class, ], // MUST be logged in // MUST have 2FA // MUST NOT have confirmation. 'user-logged-in-2fa-no-activation' => [ EncryptCookies::class, AddQueuedCookiesToResponse::class, StartSession::class, ShareErrorsFromSession::class, VerifyCsrfToken::class, Authenticate::class, AuthenticateTwoFactor::class, IsNotConfirmed::class, ], // MUST be logged in // don't care about 2fa // don't care about confirmation. 'user-simple-auth' => [ EncryptCookies::class, AddQueuedCookiesToResponse::class, StartSession::class, ShareErrorsFromSession::class, VerifyCsrfToken::class, Authenticate::class, ], // MUST be logged in // MUST have 2fa // MUST be confirmed. // (this group includes the other Firefly middleware) 'user-full-auth' => [ EncryptCookies::class, AddQueuedCookiesToResponse::class, StartSession::class, ShareErrorsFromSession::class, VerifyCsrfToken::class, Authenticate::class, AuthenticateTwoFactor::class, IsConfirmed::class, Range::class, Binder::class, ], // MUST be logged in // MUST have 2fa // MUST be confirmed. // MUST have owner role // (this group includes the other Firefly middleware) 'admin' => [ EncryptCookies::class, AddQueuedCookiesToResponse::class, StartSession::class, ShareErrorsFromSession::class, VerifyCsrfToken::class, Authenticate::class, AuthenticateTwoFactor::class, IsConfirmed::class, IsAdmin::class, Range::class, Binder::class, ], 'api' => [ 'throttle:60,1', ], ]; /** * The application's route middleware. * * These middleware may be assigned to groups or used individually. * * @var array */ protected $routeMiddleware = [ 'auth' => Authenticate::class, 'auth.basic' => AuthenticateWithBasicAuth::class, 'guest' => RedirectIfAuthenticated::class, 'throttle' => ThrottleRequests::class, 'range' => Range::class, ]; }