View Source BtrzAuth (BtrzAuth v1.3.0)
BtrzAuth is the authentication api for the Betterez Elixir APIs.
Summary
Functions
Generates an internal token using the configuration main or secondary secret keys.
Generates an user token using the configuration secret keys.
Functions
@spec internal_auth_token(Keyword.t()) :: {:ok, Guardian.Token.token(), Guardian.Token.claims()} | {:error, any()}
Generates an internal token using the configuration main or secondary secret keys.
It will return a token using the issuer passed by configuration and %{}
claims.
Options:
issuer
- the issuer of the tokenmain_secret
- main secret keysecondary_secret
- secondary secret key
@spec user_auth_token(Map.t(), Keyword.t()) :: {:ok, Guardian.Token.token(), Guardian.Token.claims()} | {:error, any()}
Generates an user token using the configuration secret keys.
Options:
issuer
- the issuer of the tokensecret
- secret keyclaims
- custom claims for your token. Default %{}.