Config¶
Params¶
alg
: str
¶
Currently available algorithms are HS256
, HS384
, HS512
, RS256
, RS384
, RS512
.
For HS* algorithms it is necessary to specify secret_key
. It can be
generated by the secrets library built into python.
For RS* algorithms it is necessary to specify public_key
and private_key
,
you can use jam.utils.generate_rsa_key_pair.
Tip
By default, Jam reads the JAM_JWT_SECRET_KEY
, JAM_JWT_PUBLIC_KEY
and JAM_JWT_PRIVATE_KEY
environment variables.
expire
: int
¶
This is the lifetime of the token in seconds.
list
: hashmap
¶
Configuration for lists.
type
: str
¶
black
or white
backend
: str
¶
redis
/ json
/ custom
Example toml
config:¶
[jam.jwt]
alg = "HS256"
secret_key = "SECRET"
expire = 3600