Versions in this module Expand all Collapse all v2 v2.11.4 Mar 7, 2021 v2.11.3 Mar 7, 2021 Changes in this version + const ExtensionKey + var ErrInvalidCredentials = errors.New("strategies/basic: Invalid user credentials") + var ErrMissingPrams = errors.New("strategies/basic: Request missing BasicAuth") + func New(fn AuthenticateFunc, opts ...auth.Option) auth.Strategy + func NewCached(f AuthenticateFunc, cache auth.Cache, opts ...auth.Option) auth.Strategy + func SetComparator(c Comparator) auth.Option + func SetHash(h crypto.Hash) auth.Option + func SetParser(p Parser) auth.Option + func SetUserNameHash(h crypto.Hash, key []byte) auth.Option + type AuthenticateFunc func(ctx context.Context, r *http.Request, userName, password string) (auth.Info, error) + type Comparator interface + Compare func(hashedPassword, password string) error + Hash func(password string) (string, error) + type Parser interface + Credentials func(r *http.Request) (string, string, error) + func AuthorizationParser() Parser