Boruta core v0.1.0-rc.4 Boruta.Oauth.TokenGenerator behaviour 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

Link to this callback

generate(type, token)

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

Generates a token value from token entity.

Link to this callback

secret(client)

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

Generates a secret from client entity.