View Source Boruta.Oauth.TokenGenerator behaviour (Boruta core v2.3.3)

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.