OpenmaizeJWT v0.10.2 OpenmaizeJWT.Config
This module provides an abstraction layer for configuration.
The following are valid configuration items.
name | type | default |
---|---|---|
token_alg | atom | :sha512 |
token_validity | int | 120 (minutes) |
token_data | list | %{} |
keyrotate_days | int | 28 |
Examples
The simplest way to change the default values would be to add
an openmaize_jwt
entry to the config.exs
file in your project,
like the following example.
config :openmaize_jwt,
token_alg: :sha256,
token_validity: 60,
token_data: %{iss: "www.example.com"},
keyrotate_days: 7
Summary
Functions
The algorithm used to sign the token
The number of days after which the JWT signing keys will be rotated
Additional information to be added to the token
The length of time after which a JSON Web Token expires
Functions
The algorithm used to sign the token.
The default value is :sha512, and :sha256 is also supported.
Additional information to be added to the token.
This is a map with atoms as keys. The default is an empty map.
Warning
Do not include any sensitive data in the JSON Web Token.