Update saml2_auth.py
Pass along any _next url var as part of the outstanding queries, so web2py will know where to send the user once they come back from singing on. Useful if the SAML auth is part of a CAS, because otherwise the user is sent from the CAS consumer -> CAS -> SSO -> CAS, and is never returned to the consumer application
This commit is contained in:
1 parent
76f3384aae
commit
5dcbae0b37
1 file changed
+2
@@ -121,6 +121,8 @@ def saml2_handler(session, request, config_filename = None, entityid = None):
|
|||||||
req_id, req = client.create_authn_request(destination, binding=binding)
|
req_id, req = client.create_authn_request(destination, binding=binding)
|
||||||
relay_state = web2py_uuid().replace('-','')
|
relay_state = web2py_uuid().replace('-','')
|
||||||
session.saml_outstanding_queries = {req_id: request.url}
|
session.saml_outstanding_queries = {req_id: request.url}
|
||||||
|
if '_next' in request.vars:
|
||||||
|
session.saml_outstanding_queries += '?%s' % request.vars._next
|
||||||
session.saml_req_id = req_id
|
session.saml_req_id = req_id
|
||||||
http_args = client.apply_binding(binding, str(req), destination,
|
http_args = client.apply_binding(binding, str(req), destination,
|
||||||
relay_state=relay_state)
|
relay_state=relay_state)
|
||||||
|
|||||||
Reference in new issue
Block a user