View Source Boruta.Oauth.TokenGenerator behaviour (Boruta ssi core v0.1.0-beta.1)

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

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

Generates a token value from token entity.

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

Generates a secret from client entity.

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