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 a401response.- Parameters:
- client_id
str,optional OAuth client identifier. Maps from the
clientidWWW-Authenticateparameter.- authority
str,optional Identity provider authority URL from a
401response. Used only for legacy API-driven discovery whenwell_known_urland explicit endpoints are not set.- authorization_endpoint
str,optional Authorization endpoint URL. When set together with
token_endpoint, the well-known endpoint is not contacted.- token_endpoint
str,optional Token endpoint URL.
- well_known_url
str,optional OpenID Provider metadata URL. When provided without explicit endpoints,
authorization_endpointandtoken_endpointare fetched from this URL.- scopes
list[str],optional OAuth scopes to request. Maps from the
scopeWWW-Authenticateparameter.- api_audience
str,optional API audience for Auth0-style providers. Maps from the
apiAudienceWWW-Authenticateparameter. Omit for Azure AD B2C.- redirect_uri
str,optional Registered redirect URI for the interactive login flow. Maps from the
redirecturiWWW-Authenticateparameter.- redirect_uri_port
int,optional Local port used for the browser redirect when
redirect_uriis not set. The default is32284.
- client_id
Methods
Return whether both OAuth endpoints were provided directly.
Return whether only one OAuth endpoint was provided.
Return whether enough configuration is present to skip
401discovery.Attributes