-
Notifications
You must be signed in to change notification settings - Fork 297
AppCredentials object model and update to MSAL #732
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
# 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.app.acquire_token_silent(self.scopes, account=None) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you inspect the code for acquire_token_for_client or try whether acquire_token_for_client caches? In the C# flavor of MSAL, acquire_token_for_client does the caching itself without external logic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does appear to cache. The first time through it falls into the fetch. Next pass through it does not. With that said, I did not test for expiration.
Fixes #320
This implements the new AppCredentials model.
Ditched ADAL in favor of MSAL (as that team states MSAL is the future).
As a side note, we are using the caching in MSAL instead of our own, which simplifies things.