Skip to content

Conversation

@mariuswinger
Copy link
Contributor

Why is this pull request needed?

The package python-jose seems to be unmaintained (last commit in 2021). This PR replaces it with a more up to date alternative. Courtesy of @soofstad

What does this pull request change?

Just replaces the relevant parts of code. Replacement was fairly straight-forward.

Issues related to this change:

Copy link
Contributor

@soofstad soofstad left a comment

Choose a reason for hiding this comment

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

I have only one question, does the HTTP request to grab JWKs get cached?
Like, does that happen on JWKClient instantiation, or when we first access the keys.

@mariuswinger mariuswinger requested a review from a team as a code owner June 11, 2024 09:13
@mariuswinger mariuswinger force-pushed the refactor/change-python-jose-to-pyjwt branch from ad712bf to 618258c Compare June 11, 2024 09:16
@mariuswinger
Copy link
Contributor Author

I have only one question, does the HTTP request to grab JWKs get cached? Like, does that happen on JWKClient instantiation, or when we first access the keys.

From what I can gather caching to the client happens when a signing key is requested. But we do create a new client for every request, so that would likely not make use of that caching ...

@mariuswinger
Copy link
Contributor Author

I have only one question, does the HTTP request to grab JWKs get cached? Like, does that happen on JWKClient instantiation, or when we first access the keys.

From what I can gather caching to the client happens when a signing key is requested. But we do create a new client for every request, so that would likely not make use of that caching ...

Nope, there is a cache decorator above the get_JWK_client function, so it returns the same client instance and therefore utilizes the caching!

@mariuswinger mariuswinger merged commit b18dd4b into main Jun 11, 2024
@mariuswinger mariuswinger deleted the refactor/change-python-jose-to-pyjwt branch June 11, 2024 10:26
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.

3 participants