Skip to content
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

Customizable token cache #759

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open

Customizable token cache #759

wants to merge 1 commit into from

Conversation

rayluo
Copy link
Collaborator

@rayluo rayluo commented Oct 21, 2024

Inspired by its cousin in MSAL .Net, this PR refactors MSAL Python's token cache to provide an INTERNAL helper which can store additional values from token request or response.

Implementation details (which are not exactly the same as MSAL .Net, but the overall purpose is the same):

  • We have to differentiate between request and response because they are two different data sources in this code base. And the use case (CDT experiment) needs both of them.
  • The same additional values are also used in token search.
  • Currently, the changes above are only applicable to access token.
  • The preexisting hard-coded key_id was also refactored this time to utilize the new generic declaration, and the existing test case was updated to reflect that.
  • This PR does not bring other behavior changes, and all the existing test cases still pass. So, it should be safe to merge.
  • Some other prototypes for recent projects will be built on top of this PR.

Customizable data and response to be saved into token cache
@rayluo rayluo requested a review from a team as a code owner October 21, 2024 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant