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

Commit 139e0a7

Browse files
authored
Merge pull request #162 from AzureAD/release-1.0.2
ADAL Python 1.0.2
2 parents 59a550e + 5ced422 commit 139e0a7

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

adal/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
# pylint: disable=wrong-import-position
2929

30-
__version__ = '1.0.1'
30+
__version__ = '1.0.2'
3131

3232
import logging
3333

adal/token_request.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -319,20 +319,14 @@ def get_token_with_client_credentials(self, client_secret):
319319
def get_token_with_authorization_code(self, authorization_code, client_secret, code_verifier):
320320

321321
self._log.info("Getting token with auth code.")
322-
try:
323-
token = self._find_token_from_cache()
324-
if token:
325-
return token
326-
except AdalError:
327-
self._log.exception('Attempt to look for token in cache resulted in Error')
328322
oauth_parameters = self._create_oauth_parameters(OAUTH2_GRANT_TYPE.AUTHORIZATION_CODE)
329323
oauth_parameters[OAUTH2_PARAMETERS.CODE] = authorization_code
330324
if client_secret is not None:
331325
oauth_parameters[OAUTH2_PARAMETERS.CLIENT_SECRET] = client_secret
332326
if code_verifier is not None:
333327
oauth_parameters[OAUTH2_PARAMETERS.CODE_VERIFIER] = code_verifier
334328
token = self._oauth_get_token(oauth_parameters)
335-
self._cache_driver.add(token)
329+
self._add_token_into_cache(token)
336330
return token
337331

338332
def _get_token_with_refresh_token(self, refresh_token, resource, client_secret):

0 commit comments

Comments
 (0)