Module markov.auth.auth0_authprovider_impl

Classes

class Auth0AuthProvider (domain: str, client_id: str, token_audience: str)

Implementation of AuthProvider interface with Auth0.

Ancestors

Static methods

def base64_url_decode(jwt_token)
def get_id_token()
def remove_saved_credentials()

Remove saved tokens from the secret store.

Methods

def authenticate_with_code(self, code_verifier: str, code: str)

Takes code_verifier and code from the response of Auth0's /authorize API.

Args

code_verifier
verifier for the PKCE challenge used to generate authorize code.
code
code generated by Auth0's /authorize API.

Returns

On successful authentication returns an object of type Auth0AuthenticationResponse containing refresh_token, access_token, scope, access token expiry, and token type

def fetch_and_save_latest_tokens(self)
def get_access_token(self)
def get_authorize_object(self, force_login: bool = False) ‑> Auth0AuthorizeParams
def get_decoded_identity(self) ‑> Dict
def refresh_token_login(self, refresh_token: str)

Login using a refresh_token.

Args

refresh_token

class Auth0AuthorizeParams (authorize_url: str, code_verifier: str)

Parameters for OAuth 2.0 grant request with PKCE.

Once a code challenge, and verifier pair have been created app must send the user to an authorization url for consent at the requested permissions level. On successful grant an authorization code is sent in the callback. The authorization code, along with code_verifier can be exchanged for access and refresh tokens.

More details about the flow here: https://auth0.com/docs/authorization/flows/authorization-code-flow-with-proof-key-for-code-exchange-pkce

Class variables

var authorize_url : str

Code verifier to be sent along with authorization code to get access and refresh token

var code_verifier : str
class Auth0TokenResponse (access_token: str, id_token: str, expires_in: int, refresh_token: str, scope: str, token_type: str)

Response from Auth0's /oauth/token API.

Class variables

var access_token : str
var expires_in : int
var id_token : str
var refresh_token : str
var scope : str
var token_type : str