Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromRawCookies ¶
FromRawCookies takes a raw cookie string and returns a slice of *http.Cookie
func ValuesFromCookie ¶
ValuesFromCookie returns a function that extracts values from the named cookie.
func ValuesFromHeader ¶
ValuesFromHeader take http.Request.Header.Values and a prefix as input return a slice of string without the prefix when values is empty, return errHeaderExtractorValueMissing when prefix is empty, return the input values, keep the http.Request.Header.Values backing array if there is one when prefix is not empty, return a new slice of values without the prefix
Types ¶
type CookieLookup ¶
type CookieLookup struct {
Name string
}
func NewCookieExtractor ¶
func NewCookieExtractor(name string) *CookieLookup
func (*CookieLookup) Extract ¶
func (l *CookieLookup) Extract(ctx context.Context, req *middleware.Request) ([]string, error)
type HeaderExtractor ¶
type HeaderLookup ¶
type HeaderLookup struct {
Name string
CutPrefix string // Optional, used only if Source is "header"
}
func BasicTokenExtractor ¶
func BasicTokenExtractor() *HeaderLookup
func JwtTokenExtractor ¶
func JwtTokenExtractor() *HeaderLookup
func NewHeaderExtractor ¶
func NewHeaderExtractor(name, cutPrefix string) *HeaderLookup
func (*HeaderLookup) Extract ¶
func (l *HeaderLookup) Extract(ctx context.Context, req *middleware.Request) ([]string, error)
func (*HeaderLookup) Key ¶
func (l *HeaderLookup) Key() string
Click to show internal directories.
Click to hide internal directories.