Browse Source

Merge pull request #2981 from jasonlewis/fix/auth-csrf-filters

Fix for the Auth filter and docblock stuff for CSRF filter.
Taylor Otwell 10 years ago
parent
commit
2fb780b63f
2 changed files with 10 additions and 4 deletions
  1. 4 2
      app/Http/Filters/AuthFilter.php
  2. 6 2
      app/Http/Filters/CsrfFilter.php

+ 4 - 2
app/Http/Filters/AuthFilter.php

@@ -1,6 +1,7 @@
 <?php namespace App\Http\Filters;
 
 use Illuminate\Http\Request;
+use Illuminate\Routing\Route;
 use Auth, Redirect, Response;
 
 class AuthFilter {
@@ -8,10 +9,11 @@ class AuthFilter {
 	/**
 	 * Run the request filter.
 	 *
+	 * @param  \Illuminate\Routing\Route  $route
 	 * @param  \Illuminate\Http\Request  $request
 	 * @return mixed
 	 */
-	public function filter(Request $request)
+	public function filter(Route $route, Request $request)
 	{
 		if (Auth::guest())
 		{
@@ -26,4 +28,4 @@ class AuthFilter {
 		}
 	}
 
-}
+}

+ 6 - 2
app/Http/Filters/CsrfFilter.php

@@ -10,7 +10,11 @@ class CsrfFilter {
 	/**
 	 * Run the request filter.
 	 *
-	 * @return mixed
+	 * @param  \Illuminate\Routing\Route  $route
+	 * @param  \Illuminate\Http\Request  $request
+	 * @return void
+	 * 
+	 * @throws \Illuminate\Session\TokenMismatchException
 	 */
 	public function filter(Route $route, Request $request)
 	{
@@ -20,4 +24,4 @@ class CsrfFilter {
 		}
 	}
 
-}
+}