auth

package
v0.0.310 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 15, 2022 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	RateLimitExceededError  = fmt.Errorf("auth rate limit exceeded")
	IncorrectPasswordError  = fmt.Errorf("incorrect password")
	AccountIsNotActiveError = fmt.Errorf("account is not active")
)

Functions

func PasswordVerify

func PasswordVerify(encryptedPassword, password string) error

Types

type LoginRecorder

type LoginRecorder interface {
	RecordLogin(username string, loginType iamv1alpha2.LoginType, provider string, sourceIP string, userAgent string, authErr error) error
}

func NewLoginRecorder

func NewLoginRecorder(ksClient kubesphere.Interface, userLister iamv1alpha2listers.UserLister) LoginRecorder

type OAuthAuthenticator

type OAuthAuthenticator interface {
	Authenticate(provider, code string) (authuser.Info, string, error)
}

type PasswordAuthenticator

type PasswordAuthenticator interface {
	Authenticate(username, password string) (authuser.Info, string, error)
}

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
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL