Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrRateLimitExceeded = fmt.Errorf("auth rate limit exceeded") ErrIncorrectPassword = fmt.Errorf("incorrect password") ErrAccountIsNotActive = fmt.Errorf("account is not active") ErrUserNotExist = fmt.Errorf("user not exist") ErrUserOrPasswordNotValid = fmt.Errorf("user or password not valid") )
Functions ¶
func NewTokenAuthenticator ¶
func NewTokenAuthenticator(operator iam.Operator, managementInterface TokenManagementInterface) authenticator.Token
Types ¶
type MFAAuthenticator ¶
type MFAAuthenticator interface { Enabled() bool Providers(info user.Info) (UserMFAProviders, error) ProviderRequest(provider mfa.UserMFAProvider) error Authenticate(provider string, token string, req url.Values) (user.Info, error) }
func NewMFAAuthenticator ¶
type OAuthAuthenticator ¶
type OAuthAuthenticator interface {
Authenticate(provider string, req *http.Request) (user.Info, string, error)
}
func NewOauthAuthenticator ¶
func NewOauthAuthenticator(operator iam.Operator, options *authoptions.AuthenticationOptions) OAuthAuthenticator
type PasswordAuthenticator ¶
type PasswordAuthenticator interface {
Authenticate(username, password string) (user.Info, string, error)
}
func NewPasswordAuthenticator ¶
func NewPasswordAuthenticator(operator iam.Operator, options *authoptions.AuthenticationOptions) PasswordAuthenticator
type TokenManagementInterface ¶
type TokenManagementInterface interface { // Verify verifies a token, and return a User if it's a valid token, otherwise return error Verify(token string) (user.Info, error) // IssueTo issues a token a User, return error if issuing process failed IssueTo(user user.Info) (*oauth.Token, error) // RevokeAllUserTokens revoke all user tokens RevokeAllUserTokens(username string) error }
func NewTokenOperator ¶
func NewTokenOperator(operator iam.Operator, opts *authoptions.AuthenticationOptions) TokenManagementInterface
type UserMFAProviders ¶
type UserMFAProviders struct {
Providers []mfa.UserMFAProvider `json:"providers,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.