Skip to content
This repository has been archived by the owner on Sep 29, 2023. It is now read-only.

Commit

Permalink
Merge pull request #187 from AzureAD/saml1.1test
Browse files Browse the repository at this point in the history
Adding saml token types
  • Loading branch information
abhidnya13 authored Jan 24, 2019
2 parents 4d92743 + 8dbc002 commit 2f32ef2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions adal/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,8 @@ class Saml(object):

TokenTypeV1 = 'urn:oasis:names:tc:SAML:1.0:assertion'
TokenTypeV2 = 'urn:oasis:names:tc:SAML:2.0:assertion'
OasisWssSaml11TokenProfile11 = "http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1"
OasisWssSaml2TokenProfile2 = "http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV2.0"


class XmlNamespaces(object):
Expand Down
4 changes: 2 additions & 2 deletions adal/token_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ def add_parameter_if_available(parameters, key, value):

def _get_saml_grant_type(wstrust_response):
token_type = wstrust_response.token_type
if token_type == SAML.TokenTypeV1:
if token_type == SAML.TokenTypeV1 or token_type == SAML.OasisWssSaml11TokenProfile11:
return OAUTH2_GRANT_TYPE.SAML1

elif token_type == SAML.TokenTypeV2:
elif token_type == SAML.TokenTypeV2 or token_type == SAML.OasisWssSaml2TokenProfile2:
return OAUTH2_GRANT_TYPE.SAML2

else:
Expand Down

0 comments on commit 2f32ef2

Please sign in to comment.