MCPcopy Create free account
hub / github.com/corestoreio/pkg / Parse

Method Parse

util/csjwt/parser.go:88–135  ·  view source on GitHub ↗

Parse parses a rawToken into the destination token and may return an error. You must make sure to set the correct expected headers and claims in the template Token. The Header and Claims field in the destination token must be a pointer as the token itself. Error behaviour: Empty, NotFound, NotValid.

(dst *Token, rawToken []byte, keyFunc Keyfunc)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 8

TestToken_AllMarshalersFunction · 0.95
TestGobEncodingFunction · 0.95
BenchmarkTokenDecodeFunction · 0.95
TestClaimExpiresSkewFunction · 0.95
verifyTokenFunction · 0.95
ParseFromRequestMethod · 0.95
parseCookieMethod · 0.95
parseFormMethod · 0.95

Calls 6

unmarshalMethod · 0.95
getMethodMethod · 0.95
dotPositionsFunction · 0.85
StartsWithBearerFunction · 0.85
ValidMethod · 0.65
VerifyMethod · 0.65

Tested by 4

TestToken_AllMarshalersFunction · 0.76
TestGobEncodingFunction · 0.76
BenchmarkTokenDecodeFunction · 0.76
TestClaimExpiresSkewFunction · 0.76