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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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