Skip to content

Commit

Permalink
SigningMethodRS512
Browse files Browse the repository at this point in the history
  • Loading branch information
raulgzm committed Jun 8, 2015
1 parent f456c93 commit bb3bca8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/authentication/jwt_backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func InitJWTAuthenticationBackend() *JWTAuthenticationBackend {
}

func (backend *JWTAuthenticationBackend) GenerateToken(userUUID string) (string, error) {
token := jwt.New(jwt.GetSigningMethod("RS256"))
token := jwt.New(jwt.SigningMethodRS512)
token.Claims["exp"] = time.Now().Add(time.Hour * time.Duration(settings.Get().JWTExpirationDelta)).Unix()
token.Claims["iat"] = time.Now().Unix()
token.Claims["sub"] = userUUID
Expand Down

2 comments on commit bb3bca8

@PabraiVentures
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This diff breaks generating tokens. I suggest reverting this diff until it works. I get an error that the hash function is unavailable when the signing method is RS512, but it works with GetSigningMethod("RS256")

@PabraiVentures
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Breaking change (at least for me)

Please sign in to comment.