Logout fix
'url' parameter changed to 'service' according to http://jasig.github.io/cas/development/installation/Logout-Single-Signout.html Added CAS_AFTER_LOGOUT config to specify URL for redirect after logout
This commit is contained in:
parent
c2fd011dce
commit
bcbd4d0393
3 changed files with 5 additions and 3 deletions
|
@ -124,6 +124,7 @@ you may use the `cas.login_required` method.
|
|||
|CAS_LOGIN_ROUTE | '/cas' |
|
||||
|CAS_LOGOUT_ROUTE | '/cas/logout' |
|
||||
|CAS_VALIDATE_ROUTE | '/cas/validate'|
|
||||
|CAS_AFTER_LOGOUT | '/' |
|
||||
|
||||
## Example ##
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@ def create_cas_login_url(cas_url, cas_route, service, renew=None, gateway=None):
|
|||
)
|
||||
|
||||
|
||||
def create_cas_logout_url(cas_url, cas_route, url=None):
|
||||
def create_cas_logout_url(cas_url, cas_route, service=None):
|
||||
""" Create a CAS logout URL.
|
||||
|
||||
Keyword arguments:
|
||||
|
@ -93,7 +93,7 @@ def create_cas_logout_url(cas_url, cas_route, url=None):
|
|||
return create_url(
|
||||
cas_url,
|
||||
cas_route,
|
||||
('url', url),
|
||||
('service', service),
|
||||
)
|
||||
|
||||
|
||||
|
|
|
@ -66,7 +66,8 @@ def logout():
|
|||
|
||||
redirect_url = create_cas_logout_url(
|
||||
current_app.config['CAS_SERVER'],
|
||||
current_app.config['CAS_LOGOUT_ROUTE'])
|
||||
current_app.config['CAS_LOGOUT_ROUTE'],
|
||||
current_app.config['CAS_AFTER_LOGOUT'])
|
||||
|
||||
current_app.logger.debug('Redirecting to: {0}'.format(redirect_url))
|
||||
return flask.redirect(redirect_url)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue