# Constants
SigningMethodHS512 hmac方法.
SigningMethodRS256 rsa256方法.
SigningMethodRS512 rsa512方法.
# Structs
AppClaims App票据声明.
Conf 配置信息
<yaml example>
jwt_conf:
enable: false public_key: private_key: algorithm: RS256 hmac_secret: example token_issuer: authority
<toml example>
# ::jwt密钥配置::
[jwt_conf]
enable = false
# 公钥文件或字符串
public_key = ""
# 私钥文件或字符串
private_key = ""
# 加密算法: RS256 | RS512 | HS512
algorithm = "RS256"
# 密钥,当algorithm = "HS512"时需要配置此项
hmac_secret = "example"
# 令牌颁发者
token_issuer = "authority".