From 1655a507046c17e2a665440f5067b83c278a6a00 Mon Sep 17 00:00:00 2001 From: KynixInHK Date: Wed, 10 Jul 2024 13:24:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=BE=A9=E4=BA=86jwt=E9=9D=9E?= =?UTF-8?q?=E5=B0=8D=E7=A8=B1=E5=8A=A0=E5=AF=86=E5=95=8F=E9=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- am_jwt/jwt.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/am_jwt/jwt.go b/am_jwt/jwt.go index 7b88a06..fb6d67d 100644 --- a/am_jwt/jwt.go +++ b/am_jwt/jwt.go @@ -124,7 +124,7 @@ func GenToken(claims *TokenClaims) (string, error) { } // 生成token字串 - tokenGenerator := jwt.NewWithClaims(jwt.SigningMethodHS256, tokenClaims) + tokenGenerator := jwt.NewWithClaims(jwt.SigningMethodRS256, tokenClaims) token, err := tokenGenerator.SignedString(privKey) // 生成token if err != nil { return "", err