oneTimeToken

package
v0.0.0-...-fa3e48d Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2024 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EmailConfirmationUse = "email_confirmation"
	PasswordResetUse     = "password"
)

Variables

View Source
var ErrDuplicateOneTimeToken = errors.New("duplicate one time token")

Functions

This section is empty.

Types

type Manager

type Manager interface {
	NewForEmailConfirmation(ctx context.Context, userId sharedTypes.UUID, email sharedTypes.Email) (OneTimeToken, error)
	NewForPasswordReset(ctx context.Context, userId sharedTypes.UUID, email sharedTypes.Email) (OneTimeToken, error)
	ResolveAndExpireEmailConfirmationToken(ctx context.Context, token OneTimeToken) error
}

func New

func New(db *pgxpool.Pool) Manager

type OneTimeToken

type OneTimeToken string

func GenerateNewToken

func GenerateNewToken() (OneTimeToken, error)

func (OneTimeToken) Validate

func (t OneTimeToken) Validate() error

Jump to

Keyboard shortcuts

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