Boruta.Oauth.TokenGenerator behaviour (Boruta core v3.0.0-beta.4)

View Source

Behaviour to implement utilities to generate token value. This must be implemented in the module configured as token_generator set in config.exs

Summary

Callbacks

Generates a token value from token entity.

Generates a secret from client entity.

Callbacks

generate(type, token)

@callback generate(type :: :access_token | :refresh_token, token :: struct()) ::
  value :: String.t()

Generates a token value from token entity.

secret(client)

@callback secret(client :: struct()) :: value :: String.t()

Generates a secret from client entity.

tx_code_input_mode()

@callback tx_code_input_mode() :: tx_code_input_mode :: String.t()

tx_code_length()

@callback tx_code_length() :: tx_code_length :: integer()