Skip to content

Incomplete PyJWKClient.get_signing_key_from_jwt type annotation #1047

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

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

Incomplete PyJWKClient.get_signing_key_from_jwt type annotation #1047

khvn26 opened this issue Mar 16, 2025 · 1 comment · May be fixed by #1048
Labels
stale Issues without activity for more than 60 days

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.

Copy link

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days

@github-actions github-actions bot added the stale Issues without activity for more than 60 days label May 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Issues without activity for more than 60 days
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant