mirror of
https://github.com/CachetHQ/Cachet.git
synced 2025-04-20 23:41:52 +02:00
Fixed up the middleware
This commit is contained in:
parent
7b61ad0445
commit
9315de8a4c
@ -39,7 +39,7 @@ class Kernel extends HttpKernel
|
||||
'auth.api' => 'CachetHQ\Cachet\Http\Middleware\ApiAuthenticate',
|
||||
'auth.basic' => 'Illuminate\Auth\Middleware\AuthenticateWithBasicAuth',
|
||||
'guest' => 'CachetHQ\Cachet\Http\Middleware\RedirectIfAuthenticated',
|
||||
'csrf' => 'CachetHQ\Cachet\Http\Middleware\VerifyCsrfToken',
|
||||
'csrf' => 'Illuminate\Foundation\Http\Middleware\VerifyCsrfToken',
|
||||
'admin' => 'CachetHQ\Cachet\Http\Middleware\Admin',
|
||||
'login.throttling' => 'CachetHQ\Cachet\Http\Middleware\LoginThrottling',
|
||||
'app.isSetup' => 'CachetHQ\Cachet\Http\Middleware\AppIsSetup',
|
||||
|
@ -18,16 +18,18 @@ use Illuminate\Support\Facades\Response;
|
||||
class Admin
|
||||
{
|
||||
/**
|
||||
* The Guard implementation.
|
||||
* The authentication guard instance.
|
||||
*
|
||||
* @var Guard
|
||||
* @var \Illuminate\Contracts\Auth\Guard
|
||||
*/
|
||||
protected $auth;
|
||||
|
||||
/**
|
||||
* Create a new filter instance.
|
||||
* Create a new admin middleware instance.
|
||||
*
|
||||
* @param Guard $auth
|
||||
* @param \Illuminate\Contracts\Auth\Guard $auth
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(Guard $auth)
|
||||
{
|
||||
|
@ -19,16 +19,18 @@ use Illuminate\Database\Eloquent\ModelNotFoundException;
|
||||
class ApiAuthenticate
|
||||
{
|
||||
/**
|
||||
* The Guard implementation.
|
||||
* The authentication guard instance.
|
||||
*
|
||||
* @var \Illuminate\Contracts\Auth\Guard
|
||||
*/
|
||||
protected $auth;
|
||||
|
||||
/**
|
||||
* Create a new filter instance.
|
||||
* Create a new api authenticate middleware instance.
|
||||
*
|
||||
* @param \Illuminate\Contracts\Auth\Guard $auth
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(Guard $auth)
|
||||
{
|
||||
|
@ -17,16 +17,18 @@ use Illuminate\Contracts\Auth\Guard;
|
||||
class Authenticate
|
||||
{
|
||||
/**
|
||||
* The Guard implementation.
|
||||
* The authentication guard instance.
|
||||
*
|
||||
* @var \Illuminate\Contracts\Auth\Guard
|
||||
*/
|
||||
protected $auth;
|
||||
|
||||
/**
|
||||
* Create a new filter instance.
|
||||
* Create a new authenticate middleware instance.
|
||||
*
|
||||
* @param \Illuminate\Contracts\Auth\Guard $auth
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(Guard $auth)
|
||||
{
|
||||
|
@ -18,16 +18,18 @@ use Illuminate\Http\RedirectResponse;
|
||||
class RedirectIfAuthenticated
|
||||
{
|
||||
/**
|
||||
* The Guard implementation.
|
||||
* The authentication guard instance.
|
||||
*
|
||||
* @var Guard
|
||||
* @var \Illuminate\Contracts\Auth\Guard
|
||||
*/
|
||||
protected $auth;
|
||||
|
||||
/**
|
||||
* Create a new filter instance.
|
||||
* Create a new redirect if authenticated middleware instance.
|
||||
*
|
||||
* @param Guard $auth
|
||||
* @param \Illuminate\Contracts\Auth\Guard $auth
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(Guard $auth)
|
||||
{
|
||||
|
@ -1,31 +0,0 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Cachet.
|
||||
*
|
||||
* (c) Cachet HQ <support@cachethq.io>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Cachet\Http\Middleware;
|
||||
|
||||
use Closure;
|
||||
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as BaseVerifier;
|
||||
|
||||
class VerifyCsrfToken extends BaseVerifier
|
||||
{
|
||||
/**
|
||||
* Handle an incoming request.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure $next
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle($request, Closure $next)
|
||||
{
|
||||
return parent::handle($request, $next);
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user