2FAuth/app/Http/Kernel.php

91 lines
3.4 KiB
PHP
Raw Normal View History

2019-05-20 07:37:41 +02:00
<?php
namespace App\Http;
use Illuminate\Foundation\Http\Kernel as HttpKernel;
class Kernel extends HttpKernel
{
/**
* The application's global HTTP middleware stack.
*
* These middleware are run during every request to your application.
*
* @var array
*/
protected $middleware = [
2021-12-02 13:15:53 +01:00
\App\Http\Middleware\TrustProxies::class,
\Fruitcake\Cors\HandleCors::class,
// \App\Http\Middleware\CheckForMaintenanceMode::class,
\App\Http\Middleware\PreventRequestsDuringMaintenance::class,
2019-05-20 07:37:41 +02:00
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
\App\Http\Middleware\TrimStrings::class,
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
\App\Http\Middleware\SetLanguage::class,
2021-09-06 18:07:14 +02:00
\App\Http\Middleware\ForceJsonResponse::class,
2019-05-20 07:37:41 +02:00
];
/**
* The application's route middleware groups.
*
* @var array
*/
protected $middlewareGroups = [
'web' => [
\App\Http\Middleware\EncryptCookies::class,
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
\Illuminate\Session\Middleware\StartSession::class,
// \Illuminate\Session\Middleware\AuthenticateSession::class,
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
\App\Http\Middleware\VerifyCsrfToken::class,
\Illuminate\Routing\Middleware\SubstituteBindings::class,
\App\Http\Middleware\LogUserLastSeen::class,
\App\Http\Middleware\CustomCreateFreshApiToken::class,
2019-05-20 07:37:41 +02:00
],
2021-11-04 23:57:23 +01:00
'api.v1' => [
2021-12-02 13:15:53 +01:00
'throttle:api',
\Illuminate\Routing\Middleware\SubstituteBindings::class,
\App\Http\Middleware\KickOutInactiveUser::class,
2020-10-08 15:38:36 +02:00
\App\Http\Middleware\LogUserLastSeen::class,
2019-05-20 07:37:41 +02:00
],
];
/**
* The application's route middleware.
*
* These middleware may be assigned to groups or used individually.
*
* @var array
*/
protected $routeMiddleware = [
'auth' => \App\Http\Middleware\Authenticate::class,
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
'can' => \Illuminate\Auth\Middleware\Authorize::class,
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
2021-12-02 13:15:53 +01:00
'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class,
2019-05-20 07:37:41 +02:00
'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class,
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,
'AvoidResetPassword' => \App\Http\Middleware\AvoidPasswordResetInDemo::class,
2021-09-06 18:07:14 +02:00
'Json.response' => \App\Http\Middleware\ForceJsonResponse::class,
2019-05-20 07:37:41 +02:00
];
/**
* The priority-sorted list of middleware.
*
* This forces non-global middleware to always be in the given order.
*
* @var array
*/
protected $middlewarePriority = [
\Illuminate\Session\Middleware\StartSession::class,
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
\App\Http\Middleware\Authenticate::class,
\Illuminate\Session\Middleware\AuthenticateSession::class,
\Illuminate\Routing\Middleware\SubstituteBindings::class,
\Illuminate\Auth\Middleware\Authorize::class,
];
}