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

Provide an alternative source for keysets #202

Merged
merged 5 commits into from
Dec 7, 2020
Merged

Conversation

davidpatrick
Copy link
Contributor

Description

This PR is to replace #199 and addresses #201. The reason for closing #199, is that a custom cache looked to be the right solution until we started implementing it from the user standpoint. As it would require an async cache and ended up being a lot of heavy lifting for the user in order to address the issues referenced in #201.

The problem at hand we are trying to solve is allowing the user to provide an alternative source for keysets. With that in mind we should

  • provide an interface that allows the user to check an alternative source in an async flow
  • fallback to jwksURI if the alternative source provided does not contain a key for the specified KID
  • allow the alternative source to utilize the provided LRU cache if desired

References

Testing

Tests provided ✅

Checklist

  • I have added documentation for new/changed functionality in this PR or in auth0.com/docs
  • All active GitHub checks for tests, formatting, and security are passing
  • The correct base branch is being used, if not master

Allow a user to provide an interceptor for providing keys before checking an endpoint.  This will allow users to provide keys from env variables, local files, and temp cache in aws.
@davidpatrick davidpatrick requested a review from a team as a code owner December 3, 2020 00:54
@davidpatrick davidpatrick changed the title getKeysInterceptor Provides an alternative source for keysets Dec 3, 2020
@davidpatrick davidpatrick mentioned this pull request Dec 3, 2020
3 tasks
adamjmcgrath
adamjmcgrath previously approved these changes Dec 4, 2020
src/utils.js Outdated Show resolved Hide resolved
@davidpatrick davidpatrick merged commit 4446484 into master Dec 7, 2020
@davidpatrick davidpatrick deleted the getKeysInterceptor branch December 7, 2020 20:21
@davidpatrick davidpatrick changed the title Provides an alternative source for keysets Provide an alternative source for keysets Dec 7, 2020
@davidpatrick davidpatrick added this to the v1-next milestone Dec 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support loading keys from an alternative source
2 participants