auth

package
v0.0.0-...-03b3356 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: Apache-2.0 Imports: 19 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 iamv1.LoginType, provider string, sourceIP string, userAgent string, authErr error) error
}

func NewLoginRecorder

func NewLoginRecorder(client ai.Interface) LoginRecorder

type PasswordAuthenticator

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

func NewPasswordAuthenticator

func NewPasswordAuthenticator(aiClient ai.Interface,
	userLister iamv1listers.UserLister,
	authOptions *authoptions.AuthenticationOptions,
	alOptions *config.AiOptions) 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, accessTokenMaxAge, accessTokenInactivityTimeout *time.Duration) (*oauth.Token, error)
}

Jump to

Keyboard shortcuts

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