Boruta.Oauth.TokenGenerator behaviour (Boruta core v1.2.0) 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

Link to this section Summary

Callbacks

Generates a token value from token entity.

Generates a secret from client entity.

Link to this section Callbacks

Specs

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

Generates a token value from token entity.

Specs

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

Generates a secret from client entity.