mdvtools.auth.auth0_provider#
Attributes#
Classes#
Helper class that provides a standard way to create an ABC using |
Functions#
Decorator to implement retry logic with exponential backoff. |
Module Contents#
- mdvtools.auth.auth0_provider.retry_with_exponential_backoff(func)[source]#
Decorator to implement retry logic with exponential backoff.
- class mdvtools.auth.auth0_provider.Auth0Provider(app, oauth: authlib.integrations.flask_client.OAuth, client_id: str, client_secret: str, domain: str)[source]#
Bases:
mdvtools.auth.auth_provider.AuthProvider
Helper class that provides a standard way to create an ABC using inheritance.
- _initialize_oauth()[source]#
Registers the Auth0 OAuth provider and validates OpenID Connect metadata.
- logout() flask.typing.ResponseReturnValue [source]#
Logs the user out by clearing the session and redirecting to Auth0’s logout endpoint.
- get_user(token: dict | None = None) dict | None [source]#
Retrieves the user information using the provided token.
- Parameters:
token – Dictionary containing access token and user details
- Returns:
User information dictionary or None
- get_token() str | None [source]#
Retrieves the token from the session.
- Returns:
Token string or None
- handle_callback() str | None [source]#
Handles the Auth0 callback and retrieves the access token.
- Returns:
Access token string