Versions in this module Expand all Collapse all v0 v0.1.0 Jun 17, 2020 Changes in this version + const IdentityKey + var ErrInvalidCredentials = errors.New("invalid credentials") + var ErrNoCredentials = errors.New("no credentials provided") + func NewMiddleware(authenticator Authenticator) func(http.Handler) http.Handler + type Authenticator interface + Authenticate func(*http.Request, http.ResponseWriter) (Identity, error) + Challenge func(*http.Request, http.ResponseWriter) + type Identity interface + GetID func() string + func GetIdentity(ctx context.Context) Identity + type IdentityStore interface + GetIdentity func(ctx context.Context, id string) (Identity, error) + GetIdentityByToken func(ctx context.Context, token, tokenType string) (Identity, error)