Skip to content

Commit

Permalink
Add link to URL with details about security vulnerabilities.
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastien-rosset committed Sep 24, 2021
1 parent 4fa3472 commit 5b39b51
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion parser.go
Expand Up @@ -15,7 +15,6 @@ type Parser struct {

// Parse parses, validates, verifies the signature and returns the parsed token.
// keyFunc will receive the parsed token and should return the key for validating.
// If everything is kosher, err will be nil.
func (p *Parser) Parse(tokenString string, keyFunc Keyfunc) (*Token, error) {
return p.ParseWithClaims(tokenString, MapClaims{}, keyFunc)
}
Expand Down
3 changes: 2 additions & 1 deletion token.go
Expand Up @@ -88,7 +88,8 @@ func (t *Token) SigningString() (string, error) {
// keyFunc will receive the parsed token and should return the cryptographic key
// for verifying the signature.
// keyFunc should validate the 'alg' claim in the token matches the expected algorithm.
// If everything is kosher, err will be nil.
// For more details about the importance of validating the 'alg' claim,
// see https://auth0.com/blog/critical-vulnerabilities-in-json-web-token-libraries/
func Parse(tokenString string, keyFunc Keyfunc) (*Token, error) {
return new(Parser).Parse(tokenString, keyFunc)
}
Expand Down

0 comments on commit 5b39b51

Please sign in to comment.