Auctoritas v0.9.1 Auctoritas.TokenManager behaviour View Source

TokenManager module

  • Specifies TokenManager behaviour
  • Implements default TokenManager with __using__ macro

Link to this section Summary

Types

Name from config (Auctoritas supervisor name)

Authentication token

Callbacks

Invoked when generating token with :refresh_token config option

Invoked when generating token from inserted authentication_data

Link to this section Types

Name from config (Auctoritas supervisor name)

Authentication token

Link to this section Callbacks

Link to this callback

generate_refresh_token(name, authentication_data) View Source
generate_refresh_token(name(), authentication_data :: map()) ::
  {:ok, refresh_token :: token()} | {:error, error :: any()}

Invoked when generating token with :refresh_token config option

Link to this callback

generate_token_and_data(name, authentication_data) View Source
generate_token_and_data(name(), authentication_data :: map()) ::
  {:ok, token(), map()} | {:error, error :: any()}

Invoked when generating token from inserted authentication_data