login

package
v0.0.0-testrgm4 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2023 License: AGPL-3.0 Imports: 13 Imported by: 508

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEmailNotAllowed       = errors.New("required email domain not fulfilled")
	ErrInvalidCredentials    = errors.New("invalid username or password")
	ErrNoEmail               = errors.New("login provider didn't return an email address")
	ErrProviderDeniedRequest = errors.New("login provider denied login request")
	ErrTooManyLoginAttempts  = errors.New("too many consecutive incorrect login attempts for user - login for user temporarily blocked")
	ErrPasswordEmpty         = errors.New("no password provided")
	ErrUserDisabled          = errors.New("user is disabled")
	ErrAbsoluteRedirectTo    = errors.New("absolute URLs are not allowed for redirect_to cookie value")
	ErrInvalidRedirectTo     = errors.New("invalid redirect_to cookie value")
	ErrForbiddenRedirectTo   = errors.New("forbidden redirect_to cookie value")
	ErrNoAuthProvider        = errors.New("enable at least one login provider")
)

Functions

This section is empty.

Types

type Authenticator

type Authenticator interface {
	AuthenticateUser(context.Context, *login.LoginUserQuery) error
}

type AuthenticatorService

type AuthenticatorService struct {
	// contains filtered or unexported fields
}

func ProvideService

func ProvideService(store db.DB, loginService login.Service,
	loginAttemptService loginattempt.Service,
	userService user.Service, cfg *setting.Cfg) *AuthenticatorService

func (*AuthenticatorService) AuthenticateUser

func (a *AuthenticatorService) AuthenticateUser(ctx context.Context, query *login.LoginUserQuery) error

AuthenticateUser authenticates the user via username & password

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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