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

Function ParseWithClaims

parser.go:268–270  ·  parser.go::ParseWithClaims

ParseWithClaims is a shortcut for NewParser().ParseWithClaims(). Note: If you provide a custom claim implementation that embeds one of the standard claims (such as RegisteredClaims), make sure that a) you either embed a non-pointer version of the claims or b) if you are using a pointer, allocate th

(tokenString string, claims Claims, keyFunc Keyfunc, options ...ParserOption)

Source from the content-addressed store, hash-verified

266// allocate the proper memory for it before passing in the overall claims,
267// otherwise you might run into a panic.
268func ParseWithClaims(tokenString string, claims Claims, keyFunc Keyfunc, options ...ParserOption) (*Token, error) {
269 return NewParser(options...).ParseWithClaims(tokenString, claims, keyFunc)
270}

Callers

nothing calls this directly

Calls 2

NewParserFunction · 0.85
ParseWithClaimsMethod · 0.80

Tested by

no test coverage detected