Skip to content

Incomplete PyJWKClient.get_signing_key_from_jwt type annotation #1047

Closed
@khvn26

Description

@khvn26

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    staleIssues without activity for more than 60 days

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions