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

Add caching to remote JWKS fetch #342

Merged
merged 6 commits into from
Jan 16, 2025
Merged

Conversation

nicknisi
Copy link
Contributor

Description

This PR adds a cache module and tests, and then uses that to cache the return value of fetching JWKS per client_id.

Documentation

Does this require changes to the WorkOS Docs? E.g. the API Reference or code snippets need updates.

[ ] Yes

If yes, link a related docs PR and add a docs maintainer as a reviewer. Their approval is required.

Fixes #334

@nicknisi nicknisi requested a review from PaulAsjes January 13, 2025 17:43
@nicknisi nicknisi force-pushed the nicknisi/cached-jwks branch from 3749120 to 87e28cd Compare January 13, 2025 19:30
Copy link
Contributor

@PaulAsjes PaulAsjes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small naming nit, otherwise good!

lib/workos/cache.rb Outdated Show resolved Hide resolved
lib/workos/cache.rb Show resolved Hide resolved
lib/workos/session.rb Show resolved Hide resolved
@nicknisi nicknisi requested a review from PaulAsjes January 16, 2025 15:15
@nicknisi nicknisi force-pushed the nicknisi/cached-jwks branch from 2f20578 to c2f5db1 Compare January 16, 2025 15:23
indicate that it's in seconds very explicitly
@nicknisi nicknisi merged commit f2f06e1 into workos:main Jan 16, 2025
4 checks passed
@nicknisi nicknisi deleted the nicknisi/cached-jwks branch January 16, 2025 16:08
@nicknisi nicknisi mentioned this pull request Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Cache Remote JWKS Fetch
2 participants