Versions in this module Expand all Collapse all v0 v0.4.0 Jun 29, 2017 Changes in this version + const AuthUsernameHeader + const DefaultClientCacheSize + const DefaultClientCacheTolerance + var NormalHeaders = &Headers + var ProxyHeaders = &Headers + func DigestAuthParams(authorization string) 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 ParseList(value string) []string + func ParsePairs(value string) map[string]string + func RandomKey() string + type AuthenticatedHandlerFunc func(http.ResponseWriter, *AuthenticatedRequest) + type AuthenticatedRequest struct + Username string + type Authenticator func(AuthenticatedHandlerFunc) http.HandlerFunc + type AuthenticatorInterface interface + NewContext func(ctx context.Context, r *http.Request) context.Context + Wrap func(AuthenticatedHandlerFunc) http.HandlerFunc + type BasicAuth struct + Headers *Headers + Realm string + Secrets SecretProvider + func NewBasicAuthenticator(realm string, secrets SecretProvider) *BasicAuth + func (a *BasicAuth) CheckAuth(r *http.Request) string + func (a *BasicAuth) NewContext(ctx context.Context, r *http.Request) context.Context + 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 + Headers *Headers + IgnoreNonceCount bool + 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) NewContext(ctx context.Context, r *http.Request) context.Context + 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 Headers struct + AuthInfo string + Authenticate string + Authorization string + UnauthCode int + UnauthContentType string + UnauthResponse string + func (h *Headers) V() *Headers + type HtdigestFile struct + Users map[string]map[string]string + type HtpasswdFile struct + Users map[string]string + type Info struct + Authenticated bool + ResponseHeaders http.Header + Username string + func FromContext(ctx context.Context) *Info + func (i *Info) UpdateHeaders(headers http.Header) + 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