|
@@ -28,8 +28,8 @@ App::after(function($request, $response)
|
|
|--------------------------------------------------------------------------
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
|
|
| The following filters are used to verify that the user of the current
|
|
| The following filters are used to verify that the user of the current
|
|
-| session is logged into this application. Also, a "guest" filter is
|
|
|
|
-| responsible for performing the opposite. Both provide redirects.
|
|
|
|
|
|
+| session is logged into this application. The "basic" filter easily
|
|
|
|
+| integrates HTTP Basic authentication for quick, simple checking.
|
|
|
|
|
|
|
|
*/
|
|
*/
|
|
|
|
|
|
@@ -39,6 +39,22 @@ Route::filter('auth', function()
|
|
});
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
+Route::filter('auth.basic', function()
|
|
|
|
+{
|
|
|
|
+ return Auth::basic();
|
|
|
|
+});
|
|
|
|
+
|
|
|
|
+/*
|
|
|
|
+|--------------------------------------------------------------------------
|
|
|
|
+| Guest Filter
|
|
|
|
+|--------------------------------------------------------------------------
|
|
|
|
+|
|
|
|
|
+| The "guest" filter is the counterpart of the authentication filters as
|
|
|
|
+| it simply checks the that current user is not logged in. A redirect
|
|
|
|
+| response will be issued if they are, which you may freely change.
|
|
|
|
+|
|
|
|
|
+*/
|
|
|
|
+
|
|
Route::filter('guest', function()
|
|
Route::filter('guest', function()
|
|
{
|
|
{
|
|
if (Auth::check()) return Redirect::to('/');
|
|
if (Auth::check()) return Redirect::to('/');
|