login

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2023 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUsernameCannotBeEmpty = errors.New("login: username cannot be empty")
	ErrUsernameTooLong       = errors.New("login: username too long")
	ErrUsernameTooShort      = errors.New("login: username too short")
	ErrUsernameInvalidChars  = errors.New("login: invalid characters")

	ErrPasswordCannotBeEmpty = errors.New("login: password cannot be empty")
	ErrPasswordTooLong       = errors.New("login: password too long")
	ErrPasswordTooShort      = errors.New("login: password too short")
)

Functions

func Credentials

func Credentials(username, password string) []byte

func PasswordValidate

func PasswordValidate(in string) error

func RegisterAccount

func RegisterAccount(db *xorm.Engine, user, pass string, tier rpcnet.Tier) error

func SetAccount

func SetAccount(acc *models.Account, username, password string, tier rpcnet.Tier) error

func UsernameValidate

func UsernameValidate(input string) error

func Verify

func Verify(username, password string, againstHash []byte) bool

Returns true if matches hash

Types

This section is empty.

Jump to

Keyboard shortcuts

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