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

Incomplete PyJWKClient.get_signing_key_from_jwt type annotation #1047

Open
khvn26 opened this issue Mar 16, 2025 · 0 comments · May be fixed by #1048
Open

Incomplete PyJWKClient.get_signing_key_from_jwt type annotation #1047

khvn26 opened this issue Mar 16, 2025 · 0 comments · May be fixed by #1048

Comments

@khvn26
Copy link

khvn26 commented Mar 16, 2025

PyJWKClient.get_signing_key_from_jwt method is not correctly type annotated. Even though the underlying code expects str | bytes, the jwt argument is only annotated with str.

Expected Result

A def get_signing_key_from_jwt(self, token: str | bytes) -> PyJWK: annotation, allowing the library users without having to extraneously decode the jwt.

Ideally, a single JWT: TypeAlias = str | bytes type exported for the library users and used in all relevant annotations.

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 a pull request may close this issue.

1 participant