BtrzAuth v0.10.1 BtrzAuth.Providers.UserToken View Source

UserToken will generate tokens for users authentication

Link to this section Summary

Functions

Gets a token for the user with the options

Link to this section Functions

Link to this function get_token(user, opts) View Source
get_token(Map.t(), Keyword.t()) ::
  {:ok, Guardian.Token.token(), Guardian.Token.claims()} | {:error, any()}

Gets a token for the user with the options.

Options may include:

  • secret - secret key for generating your token.
  • claims - custom claims for your token. Default %{}.