Fix jwt key

This commit is contained in:
zhangwenjian committed 2020-05-12 23:53:51 +08:00
1 parent 63184fcd0a
commit f6adb48837
1 file changed
+1 -2
+1 -2
View File
@@ -10,10 +10,9 @@ import (
func AuthInit() (*jwt.GinJWTMiddleware, error) {
return jwt.New(&jwt.GinJWTMiddleware{
Realm: "test zone",
Key: []byte("secret key"),
Key: []byte(config.ApplicationConfig.JwtSecret),
Timeout: time.Hour,
MaxRefresh: time.Hour,
IdentityKey: config.ApplicationConfig.JwtSecret,
PayloadFunc: handler.PayloadFunc,
IdentityHandler: handler.IdentityHandler,
Authenticator: handler.Authenticator,