feat: add jwt

This commit is contained in:
fallen-angle
2022-02-10 17:08:42 +08:00
parent 77f7d0caad
commit 2d43931fc8
10 changed files with 165 additions and 5 deletions

View File

@@ -9,6 +9,7 @@ type ServerConfig struct {
LogPath string `yaml:"logPath"`
MySQL MySQLConfig `yaml:"mysql"`
Redis RedisConfig `yaml:"redis"`
Jwt JwtConfig `yaml:"jwt"`
}
type MySQLConfig struct {
@@ -24,3 +25,9 @@ type RedisConfig struct {
Port int `yaml:"port"`
Password string `yaml:"password"`
}
type JwtConfig struct {
Secret string `yaml:"secret"`
RenewExpireDays uint `yaml:"renewExpireDays"`
RenewAheadDays uint `yaml:"renewAheadDays"`
}