Skip to content

jwt.encode and jwt.decode accept more than Union[str, bytes] as key #3381

@euresti

Description

@euresti

It's currently defined thus:

def decode(jwt: Union[str, bytes], key: Union[str, bytes] = ...,
           verify: bool = ..., algorithms: Optional[Any] = ...,
           options: Optional[Mapping[Any, Any]] = ...,
           **kwargs: Any) -> Dict[str, Any]: ...

But If you are using RSAAlgorithm you can pass in an RSAPrivateKey or RSAPublicKey as the key.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions