Versions in this module Expand all Collapse all v0 v0.1.0 Jun 17, 2020 Changes in this version + type BasicAuth struct + func NewBasicAuth(store auth.IdentityStore, validator BasicAuthValidator) *BasicAuth + func NewBasicAuthRealm(store auth.IdentityStore, validator BasicAuthValidator, realm string) *BasicAuth + func (a *BasicAuth) Authenticate(r *http.Request, w http.ResponseWriter) (auth.Identity, error) + func (a *BasicAuth) Challenge(r *http.Request, w http.ResponseWriter) + func (a BasicAuth) GetIdentityByToken(ctx context.Context, token string) (auth.Identity, error) + func (a BasicAuth) SetTokenType(v string) + type BasicAuthValidator func(username, password string) bool + type BearerToken struct + func NewBearerToken(store auth.IdentityStore) *BearerToken + func NewBearerTokenRealm(store auth.IdentityStore, realm string) *BearerToken + func (a *BearerToken) Authenticate(r *http.Request, w http.ResponseWriter) (auth.Identity, error) + func (a *BearerToken) Challenge(r *http.Request, w http.ResponseWriter) + func (a BearerToken) GetIdentityByToken(ctx context.Context, token string) (auth.Identity, error) + func (a BearerToken) SetTokenType(v string) + type Composite struct + func NewComposite(authenticators ...auth.Authenticator) *Composite + func (a *Composite) Authenticate(r *http.Request, w http.ResponseWriter) (auth.Identity, error) + func (a *Composite) Challenge(r *http.Request, w http.ResponseWriter) + type CompositeError struct + func (e CompositeError) Error() (s string) + type CookieToken struct + func NewCookieToken(store auth.IdentityStore) *CookieToken + func NewCookieTokenParam(store auth.IdentityStore, param string) *CookieToken + func (a *CookieToken) Authenticate(r *http.Request, w http.ResponseWriter) (auth.Identity, error) + func (a *CookieToken) Challenge(r *http.Request, w http.ResponseWriter) + func (a CookieToken) GetIdentityByToken(ctx context.Context, token string) (auth.Identity, error) + func (a CookieToken) SetTokenType(v string) + type QueryToken struct + func NewQueryToken(store auth.IdentityStore) *QueryToken + func NewQueryTokenParam(store auth.IdentityStore, param string) *QueryToken + func (a *QueryToken) Authenticate(r *http.Request, w http.ResponseWriter) (auth.Identity, error) + func (a *QueryToken) Challenge(r *http.Request, w http.ResponseWriter) + func (a QueryToken) GetIdentityByToken(ctx context.Context, token string) (auth.Identity, error) + func (a QueryToken) SetTokenType(v string)