Versions in this module Expand all Collapse all v1 v1.999.0 Dec 19, 2024 Changes in this version + type Account struct + Password string + Username string + type Authentication struct + Providers map[string]Authenticator + ProvidersRaw caddy.ModuleMap + func (Authentication) CaddyModule() caddy.ModuleInfo + func (a *Authentication) Provision(ctx caddy.Context) error + func (a Authentication) ServeHTTP(w http.ResponseWriter, r *http.Request, next caddyhttp.Handler) error + type Authenticator interface + Authenticate func(http.ResponseWriter, *http.Request) (User, bool, error) + type Cache struct + type Comparer interface + Compare func(hashedPassword, plaintextPassword []byte) (bool, error) + type HTTPBasicAuth struct + AccountList []Account + Accounts map[string]Account + Hash Comparer + HashCache *Cache + HashRaw json.RawMessage + Realm string + func (HTTPBasicAuth) CaddyModule() caddy.ModuleInfo + func (hba *HTTPBasicAuth) Provision(ctx caddy.Context) error + func (hba HTTPBasicAuth) Authenticate(w http.ResponseWriter, req *http.Request) (User, bool, error) + func (hba HTTPBasicAuth) AuthenticateNoCredsPrompt(req *http.Request) (User, bool, error) + type Hasher interface + FakeHash func() []byte + Hash func(plaintext []byte) ([]byte, error) + type User struct + ID string + Metadata map[string]string