Skip to content

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

Merged
merged 15 commits into from
Feb 14, 2020
Merged

Conversation

tracyboehrer
Copy link
Member

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.

@tracyboehrer tracyboehrer added the R8 Release 8 - March 16th, 2020 label Feb 12, 2020
# 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)
Copy link
Member

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.

Copy link
Member Author

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.

@tracyboehrer tracyboehrer merged commit 9fbc318 into master Feb 14, 2020
@tracyboehrer tracyboehrer deleted the trboehre/auth branch February 14, 2020 22:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
R8 Release 8 - March 16th, 2020
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Auth: Support cert based authentication for parity
2 participants