Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Curriculum-Request
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tim Steiner
Curriculum-Request
Commits
11dca85a
Commit
11dca85a
authored
14 years ago
by
Tim Steiner
Browse files
Options
Downloads
Patches
Plain Diff
Update CAS auth adapter to support single sign out.
parent
b09428ff
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
library/App/Controller/Action.php
+11
-8
11 additions, 8 deletions
library/App/Controller/Action.php
with
11 additions
and
8 deletions
library/App/Controller/Action.php
+
11
−
8
View file @
11dca85a
...
...
@@ -21,7 +21,13 @@ class App_Controller_Action extends Unl_Controller_Action
$session
=
new
Zend_Session_Namespace
(
__CLASS__
);
if
(
!
array_key_exists
(
'unl_sso'
,
$_COOKIE
))
{
return
;
// Only passively check for a login once per hour (per user)
if
(
$session
->
lastCasCheck
>
time
()
-
60
*
60
)
{
return
;
}
$session
->
lastCasCheck
=
time
();
}
else
{
$session
->
lastCasCheck
=
0
;
}
// The auth module is doing its thing (probably an active login or logout). Let it be.
...
...
@@ -29,12 +35,6 @@ class App_Controller_Action extends Unl_Controller_Action
return
;
}
// Only passively check for a login once per hour (per user)
if
(
$session
->
lastCasCheck
>
time
()
-
60
*
60
)
{
return
;
}
$session
->
lastCasCheck
=
time
();
// Do a passive authentication check
...
...
@@ -55,6 +55,9 @@ class App_Controller_Action extends Unl_Controller_Action
$casAdapter
=
new
Unl_Auth_Adapter_Cas
(
$serviceUrl
,
'https://login.unl.edu/cas'
,
$this
->
_getParam
(
'ticket'
));
$casAdapter
->
setGateway
();
$this
->
_redirect
(
$casAdapter
->
getLoginUrl
());
if
(
$casAdapter
->
isTicketExpired
())
{
$this
->
_redirect
(
$casAdapter
->
getLoginUrl
());
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment