add jwt / complete the rotation verification

This commit is contained in:
landaiqing
2024-08-12 22:05:59 +08:00
parent 54f6256c00
commit 48c5aeb0f4
31 changed files with 1702 additions and 44 deletions

10
config/conf_jwt.go Normal file
View 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
View 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"` //短信宝密码
}

View File

@@ -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"`
}