✨ add jwt / complete the rotation verification
This commit is contained in:
10
config/conf_jwt.go
Normal file
10
config/conf_jwt.go
Normal file
@@ -0,0 +1,10 @@
|
||||
package config
|
||||
|
||||
type JWT struct {
|
||||
Secret string `yaml:"secret"`
|
||||
Expiration string `yaml:"expiration"`
|
||||
RefreshExpiration string `yaml:"refresh-expiration"`
|
||||
RefreshTokenKey string `yaml:"refresh-token-key"`
|
||||
HeaderKey string `yaml:"header-key"`
|
||||
HeaderPrefix string `yaml:"header-prefix"`
|
||||
}
|
18
config/conf_sms.go
Normal file
18
config/conf_sms.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package config
|
||||
|
||||
type SMS struct {
|
||||
Ali Ali `yaml:"ali"` //阿里云短信配置
|
||||
SmsBao SmsBao `yaml:"sms-bao"` //短信宝配置
|
||||
}
|
||||
|
||||
type Ali struct {
|
||||
Host string `yaml:"host"` //主机地址
|
||||
AccessKeyID string `yaml:"access-key-id"` //阿里云AccessKeyId
|
||||
AccessKeySecret string `yaml:"access-key-secret"` //阿里云AccessKeySecret
|
||||
TemplateID string `yaml:"template-id"` //短信模板ID
|
||||
Signature string `yaml:"signature"` //短信签名
|
||||
}
|
||||
type SmsBao struct {
|
||||
User string `yaml:"user"` //短信宝用户名
|
||||
Password string `yaml:"password"` //短信宝密码
|
||||
}
|
@@ -5,4 +5,6 @@ type Config struct {
|
||||
Logger Logger `yaml:"logger"`
|
||||
System System `yaml:"system"`
|
||||
Redis Redis `yaml:"redis"`
|
||||
SMS SMS `yaml:"sms"`
|
||||
JWT JWT `yaml:"jwt"`
|
||||
}
|
||||
|
Reference in New Issue
Block a user