MCPcopy
hub / github.com/golang-jwt/jwt / Parse

Function Parse

parser.go:257–259  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

255// 'alg' claim, see
256// https://auth0.com/blog/critical-vulnerabilities-in-json-web-token-libraries/
257func 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//

Callers

nothing calls this directly

Calls 2

NewParserFunction · 0.85
ParseMethod · 0.80

Tested by

no test coverage detected