test
This commit is contained in:
@@ -615,7 +615,13 @@ func LogoutHandler(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
token, err := jwt.ParseWithClaims(tokenString, &models.AccessToken{}, func(token *jwt.Token) (interface{}, error) {
|
||||
return []byte(os.Getenv("JWT_SECRET_KEY")), nil
|
||||
if _, ok := token.Method.(*jwt.SigningMethodRSA); !ok {
|
||||
return nil, fmt.Errorf("unexpected signing method: %v", token.Header["alg"])
|
||||
}
|
||||
if rsaPrivateKey == nil {
|
||||
return nil, errors.New("RSA private key is not initialized")
|
||||
}
|
||||
return &rsaPrivateKey.PublicKey, nil
|
||||
})
|
||||
|
||||
if err == nil {
|
||||
|
||||
Reference in New Issue
Block a user