fastapi_aad_auth._base.authenticators.session

Base Session Authenticator for interactive (UI) sessions.

class fastapi_aad_auth._base.authenticators.session.SessionAuthenticator(session_validator, token_validator)[source]

Authenticator for interactive (UI) sessions.

Initialise the session authenticator.

get_access_token(user, scopes=None, app_scopes=True)[source]

Get the access token for the user.

get_access_token_from_request(request: starlette.requests.Request)[source]

Get the access token from a request object.

get_login_button(url, post_redirect='/')[source]

Get a UI login button.

get_user_from_request(request: starlette.requests.Request)[source]

Get the user from a request object.

logout(request)[source]

Process a logout request if any special behaviour required.

pop_post_auth_redirect(*args, **kwargs)[source]

Clear post-authentication redirects.

process_login_callback(request)[source]

Process the provider login callback.

process_login_request(request, force=False, redirect='/')[source]

Process the provider login request.

redirect_if_authenticated(auth_state, redirect='/')[source]

Redirect to a target if authenticated.

redirect_to_provider_login(auth_state, request)[source]

Redirect to the provider login.

set_post_auth_redirect(*args, **kwargs)[source]

Set post-authentication redirects.