Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// DefaultNamespace is returned when no token is present or extractor fails.
DefaultNamespace string
// Parse turns a token string into jwt.MapClaims (unverified parse by default).
Parse func(token string) (jwt.MapClaims, error)
// Extract returns the namespace from claims; bool indicates success.
Extract func(jwt.MapClaims) (string, bool)
}
Service derives the caller namespace from a JWT carried in context. It falls back to DefaultNamespace when no token is present or extraction fails.
Click to show internal directories.
Click to hide internal directories.