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

Function NewParser

parser.go:31–42  ·  parser.go::NewParser

NewParser creates a new Parser with the specified options

(options ...ParserOption)

Source from the content-addressed store, hash-verified

29
30// NewParser creates a new Parser with the specified options
31func NewParser(options ...ParserOption) *Parser {
32 p := &Parser{
33 validator: &Validator{},
34 }
35
36 // Loop through our parsing options and apply them
37 for _, option := range options {
38 option(p)
39 }
40
41 return p
42}
43
44// Parse parses, validates, verifies the signature and returns the parsed token.
45// keyFunc will receive the parsed token and should return the key for validating.

Callers 3

ParseFunction · 0.85
ParseWithClaimsFunction · 0.85
NewValidatorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected