diff --git a/component/jwt.go b/component/jwt.go index 2ec4315..99e84d6 100644 --- a/component/jwt.go +++ b/component/jwt.go @@ -103,7 +103,8 @@ func (JwtComponent) ParseToken(token, secret string) (*JwtComponent, error) { func (JwtComponent) GenerateSecret(secret ...string) string { // 添加10个元素,增加随机性 for i := 0; i <= 10; i++ { - secret = append(secret, uuid.NewString() + secret = append(secret, uuid.NewString()) + } // 混淆一下明文secret的顺序 n := len(secret) for i := n - 1; i > 0; i-- {