1
0
mirror of https://github.com/haiwen/seafile-server.git synced 2025-09-08 18:59:03 +00:00

Use JWT_PRIVATE_KEY (#697)

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
This commit is contained in:
feiniks
2024-09-10 15:43:25 +08:00
committed by GitHub
parent 594bed8c41
commit f0c95b4e77
3 changed files with 2 additions and 12 deletions

View File

@@ -771,7 +771,7 @@ func genJWTToken(repoID, user string) (string, error) {
}
token := jwt.NewWithClaims(jwt.GetSigningMethod("HS256"), &claims)
tokenString, err := token.SignedString([]byte(option.PrivateKey))
tokenString, err := token.SignedString([]byte(seahubPK))
if err != nil {
err := fmt.Errorf("failed to gen jwt token for repo %s", repoID)
return "", err