diff --git a/adal/__init__.py b/adal/__init__.py index 7e9775d3..f9c21fd7 100644 --- a/adal/__init__.py +++ b/adal/__init__.py @@ -27,7 +27,7 @@ # pylint: disable=wrong-import-position -__version__ = '1.2.0' +__version__ = '1.2.1' import logging diff --git a/adal/constants.py b/adal/constants.py index 7d51a673..9352076a 100644 --- a/adal/constants.py +++ b/adal/constants.py @@ -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): diff --git a/adal/log.py b/adal/log.py index 33c0f5e1..4d9c59a3 100644 --- a/adal/log.py +++ b/adal/log.py @@ -42,7 +42,7 @@ def set_logging_options(options=None): Basic Usages:: >>>adal.set_logging_options({ - >>> 'level': 'DEBUG' + >>> 'level': 'DEBUG', >>> 'handler': logging.FileHandler('adal.log') >>>}) ''' diff --git a/adal/token_request.py b/adal/token_request.py index 6332708b..14629489 100644 --- a/adal/token_request.py +++ b/adal/token_request.py @@ -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: diff --git a/requirements.txt b/requirements.txt index 14780bbb..3457060d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -requests==2.0.0 +requests==2.20.0 PyJWT==1.0.0 #need 2.x for Python3 support python-dateutil==2.1.0