restructure

This commit is contained in:
yanghao05
2023-04-20 12:11:34 +08:00
parent 6757e00d73
commit 5b8eca5d87
120 changed files with 546 additions and 7303 deletions

21
providers/jwt/config.go Normal file
View File

@@ -0,0 +1,21 @@
package jwt
import (
"time"
"github.com/rogeecn/atom/providers/log"
)
type Config struct {
SigningKey string // jwt签名
ExpiresTime string // 过期时间
Issuer string // 签发者
}
func (c *Config) ExpiresTimeDuration() time.Duration {
d, err := time.ParseDuration(c.ExpiresTime)
if err != nil {
log.Fatal(err)
}
return d
}