Parse parses, validates, verifies the signature and returns the parsed token. keyFunc will receive the parsed token and should return the cryptographic key for verifying the signature. The caller is strongly encouraged to set the WithValidMethods option to validate the 'alg' claim in the token match
(tokenString string, keyFunc Keyfunc, options ...ParserOption)
| 255 | // 'alg' claim, see |
| 256 | // https://auth0.com/blog/critical-vulnerabilities-in-json-web-token-libraries/ |
| 257 | func Parse(tokenString string, keyFunc Keyfunc, options ...ParserOption) (*Token, error) { |
| 258 | return NewParser(options...).Parse(tokenString, keyFunc) |
| 259 | } |
| 260 | |
| 261 | // ParseWithClaims is a shortcut for NewParser().ParseWithClaims(). |
| 262 | // |