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
[msal-node] Cache Lookup - 2: Save, lookup and delete entities #1655
[msal-node] Cache Lookup - 2: Save, lookup and delete entities #1655
Conversation
…arams and avoid null params
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.
Approving, but I'm starting to see a pattern of repeated logic, and it is going to bloat our codebase. Please make sure you understand the current codebase before making changes like this.
if (matches) { | ||
matchingCredentials[key] = cacheCredentials[key]; | ||
} | ||
}); |
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.
Same comment about using reduce instead of forEach
.
In this use case I believe |
[msal-node] Cache Lookup - 3: Msal node cache response
…nterface [msal-node] Cache Lookup - 2: Save, lookup and delete entities
…nterface [msal-node] Cache Lookup - 2: Save, lookup and delete entities
This PR adds the functionality to save, lookup and delete cache entities. It defines the below helpers:
saveAccount()
saveCredential()
getAccount()
getCredential()
getAccountsFilteredBy()
getCredentialsFilteredBy()
removeAccount()
removeCredential()
Unit tests added.
Note: These helpers help support
silent
andrefreshToken
flows in themsal-node
library