Skip to content
Snippets Groups Projects

Resolve "Allow expiry date for JWT tokens to be the zero date"

Merged James Page requested to merge 46-allow-expiry-date-for-jwt-tokens-to-be-the-zero-date into main
1 file
+ 1
1
Compare changes
  • Side-by-side
  • Inline
  • c7f564d5
    #46 - Validate JWT tokens with no expiry date · c7f564d5
    James Page authored
+ 1
1
@@ -100,7 +100,7 @@ func ValidateJWT(jsonWebTokenString string, secretKey string) (JsonWebToken, err
}
// Validate the expiry date
if jsonWebToken.ExpiryDate.Before(date_utils.CurrentDate()) {
if !jsonWebToken.ExpiryDate.IsZero() && jsonWebToken.ExpiryDate.Before(date_utils.CurrentDate()) {
return jsonWebToken, errors.Error("token has expired")
}
Loading