From c856c2b0e28d2f092adfa4a1e7a0899788c1eb5f Mon Sep 17 00:00:00 2001 From: Vinyl Darkscratch Date: Sat, 9 Feb 2019 10:03:41 -0800 Subject: [PATCH] Fix tabs + indents mix --- gluon/contrib/login_methods/saml2_auth.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/gluon/contrib/login_methods/saml2_auth.py b/gluon/contrib/login_methods/saml2_auth.py index ea650463..7bec2612 100644 --- a/gluon/contrib/login_methods/saml2_auth.py +++ b/gluon/contrib/login_methods/saml2_auth.py @@ -108,8 +108,8 @@ def saml2_handler(session, request, config_filename = None, entityid = None): config_filename = config_filename or os.path.join(request.folder,'private','sp_conf') client = Saml2Client(config_file = config_filename) if not entityid: - idps = client.metadata.with_descriptor("idpsso") - entityid = idps.keys()[0] + idps = client.metadata.with_descriptor("idpsso") + entityid = idps.keys()[0] bindings = [BINDING_HTTP_REDIRECT, BINDING_HTTP_POST] binding, destination = client.pick_binding( "single_sign_on_service", bindings, "idpsso", entity_id=entityid) @@ -120,7 +120,7 @@ def saml2_handler(session, request, config_filename = None, entityid = None): if not request.vars.SAMLResponse: req_id, req = client.create_authn_request(destination, binding=binding) relay_state = web2py_uuid().replace('-','') - session.saml_outstanding_queries = {req_id: request.url} + session.saml_outstanding_queries = {req_id: request.url} session.saml_req_id = req_id http_args = client.apply_binding(binding, str(req), destination, relay_state=relay_state) @@ -150,14 +150,14 @@ class Saml2Auth(object): self.config_file = config_file self.maps = maps - # URL for redirecting users to when they sign out + # URL for redirecting users to when they sign out self.saml_logout_url = logout_url # URL to let users change their password in the IDP system self.saml_change_password_url = change_password_url - - # URL to specify an IDP if using federation metadata or an MDQ - self.entityid = entityid + + # URL to specify an IDP if using federation metadata or an MDQ + self.entityid = entityid def login_url(self, next="/"): d = saml2_handler(current.session, current.request, entityid=self.entityid)