authvalues

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicAuthToken

type BasicAuthToken struct {
	AuthToken    string
	ExpiresAt    time.Time
	RefreshToken uuid.NullUUID
}

func (*BasicAuthToken) Regenerate

func (bat *BasicAuthToken) Regenerate(tokenDuration time.Duration) error

type UserBasic

type UserBasic struct {
	Username string
	Email    string
	Password string
}

func (UserBasic) ComparePassword

func (ub UserBasic) ComparePassword(otherPass string) (ok bool, err error)

ComparePassword checks the password hash against another password. Is expected that the UserBasic stored password is already encrypted by the EncryptPassword method, and the other password should not be encrypted.

func (UserBasic) EncryptPassword

func (ub UserBasic) EncryptPassword() ([]byte, error)

EncryptPassword hashes a password using bcrypt with the configured cost.

func (UserBasic) ObfuscateEmail

func (ub UserBasic) ObfuscateEmail() string

Jump to

Keyboard shortcuts

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