fastapi_aad_auth._base.provider

class fastapi_aad_auth._base.provider.Provider(validators: List[fastapi_aad_auth._base.validators.base.Validator], authenticator: fastapi_aad_auth._base.authenticators.session.SessionAuthenticator, enabled: bool = True, oauth_base_route: str = '/oauth')[source]

Authentication Provider.

Initialise the authentication provider.

get_routes(noauth_redirect='/')[source]

Get the authenticator routes.

property login_url

Get the login url.

logout(request)[source]

Logout from the authenticator.

property redirect_url

Get the login redirect url.

class fastapi_aad_auth._base.provider.ProviderConfig(**kwargs)[source]

Configuration for a provider.

Keyword Arguments
  • flow_type (fastapi_aad_auth._base.validators.token.OAuthFlowType) -- Select the OpenAPI OAuth2 flow [default: OAuthFlowType.authorizationCode] (Can be set by FASTAPI_AUTH_OPENAPI_OAUTH2_FLOW environment variable)

  • token_scopes (dict) -- Set the (global) token scopes (Can be set by FASTAPI_AUTH_TOKEN_SCOPES environment variable)