Skip to content

Commit

Permalink
Adopt MSAL 0.4.1 (Azure#6176)
Browse files Browse the repository at this point in the history
  • Loading branch information
chlowell authored and rajivnandivada committed Jul 3, 2019
1 parent 69bc4e9 commit 4af3d32
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
9 changes: 1 addition & 8 deletions sdk/identity/azure-identity/azure/identity/_authn_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,8 @@ def _deserialize_and_cache_token(self, response, scopes, request_time):

token = payload["access_token"]

# these values are strings in some responses but msal.TokenCache requires they be integers
# https://github.com/AzureAD/microsoft-authentication-library-for-python/pull/55
if "expires_in" in payload:
payload["expires_in"] = int(payload["expires_in"])
if "ext_expires_in" in payload:
payload["ext_expires_in"] = int(payload["ext_expires_in"])

# AccessToken wants expires_on as an int
expires_on = payload.get("expires_on") or payload["expires_in"] + request_time
expires_on = payload.get("expires_on") or int(payload["expires_in"]) + request_time
try:
expires_on = int(expires_on)
except ValueError:
Expand Down
2 changes: 1 addition & 1 deletion sdk/identity/azure-identity/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,6 @@
"azure",
]
),
install_requires=["azure-core<2.0.0,>=1.0.0b1", "cryptography>=2.1.4", "msal~=0.3.1"],
install_requires=["azure-core<2.0.0,>=1.0.0b1", "cryptography>=2.1.4", "msal~=0.4.1"],
extras_require={":python_version<'3.0'": ["azure-nspkg"], ":python_version<'3.5'": ["typing"]},
)
2 changes: 1 addition & 1 deletion shared_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ azure-storage-queue~=1.3
cryptography>=2.1.4
futures
typing
msal~=0.3.1
msal~=0.4.1
msrest>=0.5.0
msrestazure<2.0.0,>=0.4.32
requests>=2.18.4
Expand Down

0 comments on commit 4af3d32

Please sign in to comment.