Versions in this module Expand all Collapse all v0 v0.12.5 Mar 4, 2020 v0.12.4 Mar 3, 2020 v0.12.3 Feb 7, 2019 GO-2020-0033 GO-2020-0033: Path Traversal in aahframe.work v0.12.2 Dec 13, 2018 GO-2020-0033 GO-2020-0033: Path Traversal in aahframe.work v0.12.1 Dec 8, 2018 GO-2020-0033 GO-2020-0033: Path Traversal in aahframe.work v0.12.0 Dec 2, 2018 GO-2020-0033 GO-2020-0033: Path Traversal in aahframe.work Changes in this version + var ErrOAuth2Exchange = errors.New("oauth2: exchange failed, unable to get token") + var ErrOAuth2InvalidState = errors.New("oauth2: invalid state") + var ErrOAuth2MissingStateOrCode = errors.New("oauth2: callback missing state or code") + var ErrOAuth2TokenIsValid = errors.New("oauth2: token is vaild") + type BaseAuth struct + AppConfig *config.Config + KeyName string + KeyPrefix string + Name string + func (b *BaseAuth) ConfigError(keySuffix string) error + func (b *BaseAuth) ConfigKey(suffix string) string + func (b *BaseAuth) DoAuthenticate(authcToken *authc.AuthenticationToken) (*authc.AuthenticationInfo, error) + func (b *BaseAuth) DoAuthorizationInfo(authcInfo *authc.AuthenticationInfo) *authz.AuthorizationInfo + func (b *BaseAuth) ExtractAuthenticationToken(r *ahttp.Request) *authc.AuthenticationToken + func (b *BaseAuth) Init(appCfg *config.Config, keyName string) error + func (b *BaseAuth) Key() string + func (b *BaseAuth) Scheme() string + func (b *BaseAuth) SetAuthenticator(authenticator authc.Authenticator) error + func (b *BaseAuth) SetAuthorizer(authorizer authz.Authorizer) error + func (b *BaseAuth) SetPrincipalProvider(principal authc.PrincipalProvider) error + type BasicAuth struct + RealmName string + func (b *BasicAuth) DoAuthenticate(authcToken *authc.AuthenticationToken) (*authc.AuthenticationInfo, error) + func (b *BasicAuth) DoAuthorizationInfo(authcInfo *authc.AuthenticationInfo) *authz.AuthorizationInfo + func (b *BasicAuth) ExtractAuthenticationToken(r *ahttp.Request) *authc.AuthenticationToken + func (b *BasicAuth) Init(cfg *config.Config, keyName string) error + type FormAuth struct + DefaultTargetURL string + FieldCredential string + FieldIdentity string + IsAlwaysToDefaultTarget bool + LoginFailureURL string + LoginSubmitURL string + LoginURL string + func (f *FormAuth) DoAuthenticate(authcToken *authc.AuthenticationToken) (*authc.AuthenticationInfo, error) + func (f *FormAuth) ExtractAuthenticationToken(r *ahttp.Request) *authc.AuthenticationToken + func (f *FormAuth) Init(cfg *config.Config, keyName string) error + type GenericAuth struct + CredentialHeader string + IdentityHeader string + func (g *GenericAuth) ExtractAuthenticationToken(r *ahttp.Request) *authc.AuthenticationToken + func (g *GenericAuth) Init(cfg *config.Config, keyName string) error + type OAuth2 struct + LoginURL string + RedirectURL string + SuccessURL string + func (o *OAuth2) Client(token *oauth2.Token) *http.Client + func (o *OAuth2) Config() *oauth2.Config + func (o *OAuth2) Init(appCfg *config.Config, keyName string) error + func (o *OAuth2) Principal(keyName string, v ess.Valuer) ([]*authc.Principal, error) + func (o *OAuth2) ProviderAuthURL(r *ahttp.Request) (string, string) + func (o *OAuth2) RefreshAccessToken(token *oauth2.Token) (*oauth2.Token, error) + func (o *OAuth2) ValidateCallback(state string, r *ahttp.Request) (*oauth2.Token, error) + type Schemer interface + DoAuthenticate func(authcToken *authc.AuthenticationToken) (*authc.AuthenticationInfo, error) + DoAuthorizationInfo func(authcInfo *authc.AuthenticationInfo) *authz.AuthorizationInfo + ExtractAuthenticationToken func(r *ahttp.Request) *authc.AuthenticationToken + Init func(appCfg *config.Config, keyName string) error + Key func() string + Scheme func() string + func New(authSchemeType string) Schemer