Versions in this module Expand all Collapse all v2 v2.5.2 Jun 8, 2022 Changes in this version + type Account struct + Password string + Salt 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 BcryptHash struct + func (BcryptHash) CaddyModule() caddy.ModuleInfo + func (BcryptHash) Compare(hashed, plaintext, _ []byte) (bool, error) + func (BcryptHash) Hash(plaintext, _ []byte) ([]byte, error) + type Cache struct + type Comparer interface + Compare func(hashedPassword, plaintextPassword, salt []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) + type Hasher interface + Hash func(plaintext, salt []byte) ([]byte, error) + type ScryptHash struct + KeyLength int + N int + P int + R int + func (ScryptHash) CaddyModule() caddy.ModuleInfo + func (s *ScryptHash) Provision(_ caddy.Context) error + func (s *ScryptHash) SetDefaults() + func (s ScryptHash) Compare(hashed, plaintext, salt []byte) (bool, error) + func (s ScryptHash) Hash(plaintext, salt []byte) ([]byte, error) + type User struct + ID string + Metadata map[string]string