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:
@@ -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
|
||||
|
Reference in New Issue
Block a user