Skip to content

Commit

Permalink
Merge pull request #246 from maykinmedia/set-acs-binding
Browse files Browse the repository at this point in the history
Add the ability to change the ProtocolBinding in the authn request.
  • Loading branch information
pitbulk authored Feb 22, 2021
2 parents 89532fa + 9cc63eb commit 484f545
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/onelogin/saml2/authn_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ def __init__(self, settings, force_authn=False, is_passive=False, set_nameid_pol
'nameid_policy_str': nameid_policy_str,
'requested_authn_context_str': requested_authn_context_str,
'attr_consuming_service_str': attr_consuming_service_str,
'acs_binding': sp_data['assertionConsumerService'].get('binding', 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST')
}

self.__authn_request = request
Expand Down
2 changes: 1 addition & 1 deletion src/onelogin/saml2/xml_templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class OneLogin_Saml2_Templates(object):
Version="2.0"%(provider_name)s%(force_authn_str)s%(is_passive_str)s
IssueInstant="%(issue_instant)s"
Destination="%(destination)s"
ProtocolBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
ProtocolBinding="%(acs_binding)s"
AssertionConsumerServiceURL="%(assertion_url)s"%(attr_consuming_service_str)s>
<saml:Issuer>%(entity_id)s</saml:Issuer>%(subject_str)s%(nameid_policy_str)s
%(requested_authn_context_str)s
Expand Down

0 comments on commit 484f545

Please sign in to comment.