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

Interface Extractor

request/extractor.go:17–19  ·  request/extractor.go::Extractor

Extractor is an interface for extracting a token from an HTTP request. The ExtractToken method should return a token string or an error. If no token is present, you must return ErrNoTokenInRequest.

Source from the content-addressed store, hash-verified

15// The ExtractToken method should return a token string or an error.
16// If no token is present, you must return ErrNoTokenInRequest.
17type Extractor interface {
18 ExtractToken(*http.Request) (string, error)
19}
20
21// HeaderExtractor is an extractor for finding a token in a header.
22// Looks at each specified header in order until there's a match

Callers 7

ExampleHeaderExtractorFunction · 0.65
ExampleArgumentExtractorFunction · 0.65
ExtractTokenMethod · 0.65
ExtractTokenMethod · 0.65
ParseFromRequestFunction · 0.65
TestExtractorFunction · 0.65
TestBearerExtractorFunction · 0.65

Implementers 2

PostExtractionFilterrequest/extractor.go
BearerExtractorrequest/extractor.go

Calls

no outgoing calls

Tested by

no test coverage detected