Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
syncEnrollments
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Yeray Santana Hualde
syncEnrollments
Commits
3b601fee
Commit
3b601fee
authored
Apr 08, 2013
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added auth.basic filter.
parent
d8daedcb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
2 deletions
+18
-2
filters.php
app/filters.php
+18
-2
No files found.
app/filters.php
View file @
3b601fee
...
@@ -28,8 +28,8 @@ App::after(function($request, $response)
...
@@ -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
| session is logged into this application.
The "basic" filter easily
|
responsible for performing the opposite. Both provide redirects
.
|
integrates HTTP Basic authentication for quick, simple checking
.
|
|
*/
*/
...
@@ -39,6 +39,22 @@ Route::filter('auth', function()
...
@@ -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
(
'/'
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment