OIDCConfiguration#

class OIDCConfiguration(client_id=None, authority=None, authorization_endpoint=None, token_endpoint=None, well_known_url=None, scopes=None, api_audience=None, redirect_uri=None, redirect_uri_port=32284)#

OpenID Connect settings for API authentication.

When provided on with_oidc(), the OIDC session is configured without contacting the API for a 401 response.

Parameters:
client_idstr, optional

OAuth client identifier. Maps from the clientid WWW-Authenticate parameter.

authoritystr, optional

Identity provider authority URL from a 401 response. Used only for legacy API-driven discovery when well_known_url and explicit endpoints are not set.

authorization_endpointstr, optional

Authorization endpoint URL. When set together with token_endpoint, the well-known endpoint is not contacted.

token_endpointstr, optional

Token endpoint URL.

well_known_urlstr, optional

OpenID Provider metadata URL. When provided without explicit endpoints, authorization_endpoint and token_endpoint are fetched from this URL.

scopeslist[str], optional

OAuth scopes to request. Maps from the scope WWW-Authenticate parameter.

api_audiencestr, optional

API audience for Auth0-style providers. Maps from the apiAudience WWW-Authenticate parameter. Omit for Azure AD B2C.

redirect_uristr, optional

Registered redirect URI for the interactive login flow. Maps from the redirecturi WWW-Authenticate parameter.

redirect_uri_portint, optional

Local port used for the browser redirect when redirect_uri is not set. The default is 32284.

Methods

OIDCConfiguration.has_explicit_endpoints()

Return whether both OAuth endpoints were provided directly.

OIDCConfiguration.has_partial_endpoints()

Return whether only one OAuth endpoint was provided.

OIDCConfiguration.is_complete()

Return whether enough configuration is present to skip 401 discovery.

Attributes