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 #162 from AzureAD/release-1.0.2
Browse files Browse the repository at this point in the history
ADAL Python 1.0.2
  • Loading branch information
abhidnya13 authored Jun 26, 2018
2 parents 59a550e + 5ced422 commit 139e0a7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
2 changes: 1 addition & 1 deletion adal/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

# pylint: disable=wrong-import-position

__version__ = '1.0.1'
__version__ = '1.0.2'

import logging

Expand Down
8 changes: 1 addition & 7 deletions adal/token_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,20 +319,14 @@ def get_token_with_client_credentials(self, client_secret):
def get_token_with_authorization_code(self, authorization_code, client_secret, code_verifier):

self._log.info("Getting token with auth code.")
try:
token = self._find_token_from_cache()
if token:
return token
except AdalError:
self._log.exception('Attempt to look for token in cache resulted in Error')
oauth_parameters = self._create_oauth_parameters(OAUTH2_GRANT_TYPE.AUTHORIZATION_CODE)
oauth_parameters[OAUTH2_PARAMETERS.CODE] = authorization_code
if client_secret is not None:
oauth_parameters[OAUTH2_PARAMETERS.CLIENT_SECRET] = client_secret
if code_verifier is not None:
oauth_parameters[OAUTH2_PARAMETERS.CODE_VERIFIER] = code_verifier
token = self._oauth_get_token(oauth_parameters)
self._cache_driver.add(token)
self._add_token_into_cache(token)
return token

def _get_token_with_refresh_token(self, refresh_token, resource, client_secret):
Expand Down

0 comments on commit 139e0a7

Please sign in to comment.