auth

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 18, 2022 License: GPL-2.0 Imports: 6 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrAuthenticationFailed = errors.New("authentication failed")
	ErrUsernameNotFound     = errors.New("username not found")
	ErrUserNotFound         = errors.New("user not found")
	ErrHashError            = errors.New("hashing has failed")
)

Functions

func Authenticate

func Authenticate(db *gorm.DB, username string, password string) (*utilitymodels.User, error)

Authenticate Try to authenticate with the given credentials

func SetNewPassword

func SetNewPassword(db *gorm.DB, userID uint, newPassword string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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