Fixed up the middleware

This commit is contained in:
Graham Campbell 2015-06-10 14:03:31 +01:00
parent 7b61ad0445
commit 9315de8a4c
6 changed files with 21 additions and 44 deletions

View File

@ -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',

View File

@ -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)
{

View File

@ -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)
{

View File

@ -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)
{

View File

@ -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)
{

View File

@ -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);
}
}