PrimaAuth0Ex.TokenCache behaviour (prima_auth0_ex v0.9.3)

View Source

Behaviour that defines a cache for tokens.

Summary

Callbacks

child_spec(any)

@callback child_spec(any()) :: Supervisor.child_spec()

get_token_for(atom, t)

@callback get_token_for(atom(), String.t()) ::
  {:ok, PrimaAuth0Ex.TokenProvider.TokenInfo.t() | nil} | {:error, any()}

set_token_for(atom, t, t)

@callback set_token_for(atom(), String.t(), PrimaAuth0Ex.TokenProvider.TokenInfo.t()) ::
  :ok | {:error, any()}

Functions

child_spec(opts)

get_configured_cache_provider()

get_token_for(client, audience)

set_token_for(client, audience, token)