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

Struct BearerExtractor

request/extractor.go:87–87  ·  view source on GitHub ↗

BearerExtractor extracts a token from the Authorization header. The header is expected to match the format "Bearer XX", where "XX" is the JWT token.

Source from the content-addressed store, hash-verified

85// The header is expected to match the format "Bearer XX", where "XX" is the
86// JWT token.
87type BearerExtractor struct{}
88
89func (e BearerExtractor) ExtractToken(req *http.Request) (string, error) {
90 tokenHeader := req.Header.Get("Authorization")

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected