Skip to content

Commit 569a842

Browse files
committed
Fix whitespace and formatting
Signed-off-by: Ivan Kanakarakis <[email protected]>
1 parent 27c11b6 commit 569a842

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

example/plugins/frontends/saml2_frontend.yaml.example

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,9 @@ config:
5252
"https://accounts.google.com": LoA1
5353

5454
endpoints:
55-
single_sign_on_service: {'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST': sso/post,
56-
'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect': sso/redirect}
55+
single_sign_on_service:
56+
'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST': sso/post
57+
'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect': sso/redirect
5758

5859
# If configured and not false or empty the common domain cookie _saml_idp will be set
5960
# with or have appended the IdP used for authentication. The default is not to set the

src/satosa/frontends/saml2.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ def _set_common_domain_cookie(self, internal_response, http_args, context):
448448
satosa_logging(logger, logging.DEBUG, "Found existing common domain cookie {}".format(common_domain_cookie), context.state)
449449
space_separated_b64_idp_string = unquote(common_domain_cookie.value)
450450
b64_idp_list = space_separated_b64_idp_string.split()
451-
idp_list = [ urlsafe_b64decode(b64_idp).decode('utf-8') for b64_idp in b64_idp_list ]
451+
idp_list = [urlsafe_b64decode(b64_idp).decode('utf-8') for b64_idp in b64_idp_list]
452452
else:
453453
satosa_logging(logger, logging.DEBUG, "No existing common domain cookie found", context.state)
454454
idp_list = []
@@ -459,15 +459,15 @@ def _set_common_domain_cookie(self, internal_response, http_args, context):
459459
this_flow_idp = internal_response.to_dict()['auth_info']['issuer']
460460

461461
# Remove all occurrences of the current IdP from the list of IdPs.
462-
idp_list = [ idp for idp in idp_list if idp != this_flow_idp ]
462+
idp_list = [idp for idp in idp_list if idp != this_flow_idp]
463463

464464
# Append the current IdP.
465465
idp_list.append(this_flow_idp)
466466
satosa_logging(logger, logging.DEBUG, "Added IdP {} to common domain cookie list of IdPs".format(this_flow_idp), context.state)
467467
satosa_logging(logger, logging.DEBUG, "Common domain cookie list of IdPs is now {}".format(idp_list), context.state)
468468

469469
# Construct the cookie.
470-
b64_idp_list = [ urlsafe_b64encode(idp.encode()).decode("utf-8") for idp in idp_list ]
470+
b64_idp_list = [urlsafe_b64encode(idp.encode()).decode("utf-8") for idp in idp_list]
471471
space_separated_b64_idp_string = " ".join(b64_idp_list)
472472
url_encoded_space_separated_b64_idp_string = quote(space_separated_b64_idp_string)
473473

0 commit comments

Comments
 (0)