local

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PasswordHashCost = bcrypt.DefaultCost

Functions

This section is empty.

Types

type Authenticator

type Authenticator struct{}

func New

func New() *Authenticator

func (*Authenticator) Login

func (a *Authenticator) Login(db *orm.DB, email, password string, getUserByEmail func(*orm.DB, string) (user.User, error), getLocalIdentity func(*orm.DB, string) (user.Identity, error), notify func(user.SecurityEvent)) (user.User, error)

func (*Authenticator) Mount

func (a *Authenticator) Mount(r router.Router, module any)

func (*Authenticator) Name

func (a *Authenticator) Name() string

func (*Authenticator) SetPassword

func (a *Authenticator) SetPassword(db *orm.DB, ids model.IDGenerator, userID, password string, upsertIdentity func(*orm.DB, model.IDGenerator, string, string, string, string) error) error

func (*Authenticator) VerifyPassword

func (a *Authenticator) VerifyPassword(db *orm.DB, userID, password string, getLocalIdentity func(*orm.DB, string) (user.Identity, error)) error

Jump to

Keyboard shortcuts

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