Skip to content

Commit

Permalink
Merge pull request #67 from italia/dev
Browse files Browse the repository at this point in the history
authn request extended parameters
  • Loading branch information
peppelinux committed Jul 27, 2021
2 parents 060f9de + af66136 commit 454fa71
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def readme():

setup(
name=_pkg_name,
version='0.9.4',
version='0.9.5',
description="SAML2 SPID Service Provider validation tool that can be run from the command line",
long_description=readme(),
long_description_content_type='text/markdown',
Expand Down
2 changes: 1 addition & 1 deletion src/spid_sp_test/authn_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ def __init__(
authn_plugin=authn_plugin,
request_method=request_method,
request_body=request_body,
request_content_type="data",
request_content_type=request_content_type,
)
except binascii.Error as exp:
_msg = "[2.0.0] Base64 decode of AuthnRequest MUST be correct"
Expand Down
7 changes: 7 additions & 0 deletions src/spid_sp_test/response.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,10 @@ def __init__(self, *args, **kwargs):
self.authn_plugin = kwargs.get("authn_plugin")
self.requests_session = kwargs.get("requests_session")

self.request_method = kwargs.get("request_method")
self.request_body = kwargs.get("request_body")
self.request_content_type = kwargs.get("request_content_type")

def get_acr(self):
_acr = self.authnreq_etree.xpath("//RequestedAuthnContext/AuthnContextClassRef")
if _acr:
Expand All @@ -157,6 +161,9 @@ def do_authnrequest(self):
self.authn_request_url,
authn_plugin=self.authn_plugin,
requests_session=self.requests_session,
request_method=self.request_method,
request_body=self.request_body,
request_content_type=self.request_content_type,
)
self.authnreq_etree = etree.fromstring(
self.authn_request_data["SAMLRequest_xml"]
Expand Down
5 changes: 4 additions & 1 deletion src/spid_sp_test/spid_sp_test
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,10 @@ if __name__ == '__main__':
html_path=html_path if args.html_path else None,
no_send_response = args.no_send_response,
authn_plugin = args.authn_plugin,
requests_session = authn_check.authn_request['requests_session']
requests_session = authn_check.authn_request['requests_session'],
request_method = args.request_method,
request_body = args.request_body,
request_content_type = args.request_content_type
)

if args.html_path:
Expand Down

0 comments on commit 454fa71

Please sign in to comment.