database

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	IDColumn          string
	CredentialsColumn string
	PasswordColumn    string
	// contains filtered or unexported fields
}

type Provider

type Provider[User contract.Authenticatable] struct {
	// contains filtered or unexported fields
}

func NewProvider

func NewProvider[User contract.Authenticatable](db contract.Database) *Provider[User]

func NewProviderWith

func NewProviderWith[User contract.Authenticatable](db contract.Database, options Options) *Provider[User]

func (*Provider[User]) RetrieveByCredentials

func (p *Provider[User]) RetrieveByCredentials(ctx context.Context, identifier []byte) (u User, e error)

func (*Provider[User]) UserByID

func (p *Provider[User]) UserByID(ctx context.Context, id []byte) (u User, e error)

func (*Provider[User]) Validate

func (p *Provider[User]) Validate(ctx context.Context, user User, password []byte) bool

Jump to

Keyboard shortcuts

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