Versions in this module Expand all Collapse all v1 v1.0.0 Aug 25, 2026 Changes in this version + func FormatChallenge(challenge authentication.Challenge) (string, error) + func NewMiddleware(extractor CredentialExtractor, authenticator authentication.Authenticator, ...) (func(http.Handler) http.Handler, error) + type APIKeyOption func(*apiKeySource) + func WithAPIKeyMaxBytes(maximum int) APIKeyOption + type BearerOption func(*authorizationSource) + func WithBearerMaxBytes(maximum int) BearerOption + func WithBearerPipe() BearerOption + type CredentialExtractor interface + Extract func(*http.Request) (authentication.Credential, error) + type Extractor struct + func NewExtractor(sources ...Source) (*Extractor, error) + func (e *Extractor) Extract(request *http.Request) (authentication.Credential, error) + type MiddlewareOption func(*middlewareConfig) error + func WithChallenges(challenges ...authentication.Challenge) MiddlewareOption + func WithOptionalAnonymous() MiddlewareOption + type Source interface + func APIKeyCookie(idCookie, keyCookie string, options ...APIKeyOption) Source + func APIKeyHeader(idHeader, keyHeader string, options ...APIKeyOption) Source + func APIKeyQuery(idParameter, keyParameter string, options ...APIKeyOption) Source + func BasicAuthorization() Source + func BearerAuthorization(options ...BearerOption) Source + func BearerCookie(name string, options ...BearerOption) Source + func BearerQuery(name string, options ...BearerOption) Source