simple_openid_connect.jwk

JSON-Web-Key handling code

Functions

fetch_jwks(jwks_uri)

Fetch JSON web keys from the given jwks_uri.

fetch_jwks_max_age(jwks_uri)

Fetch JSON web keys from the given jwks_uri.

simple_openid_connect.jwk.fetch_jwks(jwks_uri: str) List[JWK][source]

Fetch JSON web keys from the given jwks_uri. This uri is part of the provider configuration and used to validate responses and tokens sent by the provider.

Raises:

OpenidProtocolError – If fetching the keys fails

simple_openid_connect.jwk.fetch_jwks_max_age(jwks_uri: str) Tuple[List[JWK], datetime | None][source]

Fetch JSON web keys from the given jwks_uri. This uri is part of the provider configuration and used to validate responses and tokens sent by the provider.

Raises:

OpenidProtocolError – If fetching the keys fails