Versions in this module Expand all Collapse all v1 v1.0.1 Aug 15, 2018 Changes in this version + const DefaultClientCacheSize + const DefaultClientCacheTolerance + func DigestAuthParams(r *http.Request) map[string]string + func H(data string) string + func JustCheck(auth AuthenticatorInterface, wrapped http.HandlerFunc) http.HandlerFunc + func MD5Crypt(password, salt, magic []byte) []byte + func RandomKey() string + type AuthenticatedHandlerFunc func(http.ResponseWriter, *AuthenticatedRequest) + type AuthenticatedRequest struct + Username string + type Authenticator func(AuthenticatedHandlerFunc) http.HandlerFunc + type AuthenticatorInterface interface + Wrap func(AuthenticatedHandlerFunc) http.HandlerFunc + type BasicAuth struct + Realm string + Secrets SecretProvider + func NewBasicAuthenticator(realm string, secrets SecretProvider) *BasicAuth + func (a *BasicAuth) CheckAuth(r *http.Request) string + func (a *BasicAuth) RequireAuth(w http.ResponseWriter, r *http.Request) + func (a *BasicAuth) Wrap(wrapped AuthenticatedHandlerFunc) http.HandlerFunc + type DigestAuth struct + ClientCacheSize int + ClientCacheTolerance int + Opaque string + PlainTextSecrets bool + Realm string + Secrets SecretProvider + func NewDigestAuthenticator(realm string, secrets SecretProvider) *DigestAuth + func (a *DigestAuth) JustCheck(wrapped http.HandlerFunc) http.HandlerFunc + func (a *DigestAuth) Purge(count int) + func (a *DigestAuth) RequireAuth(w http.ResponseWriter, r *http.Request) + func (a *DigestAuth) Wrap(wrapped AuthenticatedHandlerFunc) http.HandlerFunc + func (da *DigestAuth) CheckAuth(r *http.Request) (username string, authinfo *string) + type File struct + Info os.FileInfo + Path string + Reload func() + func (f *File) ReloadIfNeeded() + type HtdigestFile struct + Users map[string]map[string]string + type HtpasswdFile struct + Users map[string]string + type MD5Entry struct + Hash []byte + Magic []byte + Salt []byte + func NewMD5Entry(e string) *MD5Entry + type SecretProvider func(user, realm string) string + func HtdigestFileProvider(filename string) SecretProvider + func HtpasswdFileProvider(filename string) SecretProvider