Auctoritas v0.2.3 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 authenticating; checks supplied authentication_data

Invoked when authenticating; checks supplied data

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

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

Invoked when authenticating; checks supplied authentication_data

Link to this callback

data_check(name, data) View Source
data_check(name(), data :: map()) ::
  {atom(), any()} :: {:ok, data :: map()} | {:error, error :: any()}

Invoked when authenticating; checks supplied data

Link to this callback

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

Invoked when generating token from inserted authentication_data