Skip to content

Commit

Permalink
black formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Tracy Boehrer committed Apr 3, 2024
1 parent 37d975d commit abb4f94
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,10 @@ def get_access_token(self, force_refresh: bool = False) -> str:
# Firstly, looks up a token from cache
# Since we are looking for token for the current app, NOT for an end user,
# notice we give account parameter as None.
auth_token = self.__get_msal_app().acquire_token_silent(
scopes, account=None
)
auth_token = self.__get_msal_app().acquire_token_silent(scopes, account=None)
if not auth_token:
# No suitable token exists in cache. Let's get a new one from AAD.
auth_token = self.__get_msal_app().acquire_token_for_client(
scopes=scopes
)
auth_token = self.__get_msal_app().acquire_token_for_client(scopes=scopes)
return auth_token["access_token"]

def __get_msal_app(self):
Expand Down

0 comments on commit abb4f94

Please sign in to comment.