auth

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2024 License: BSD-3-Clause Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnsupportedCredentialType = errors.New("unsupported credential type")
)

Functions

This section is empty.

Types

type Service

type Service interface {
	IsTokenValid(token string) (bool, error)
	GetUserFromAuthToken(token string) (*entities.User, error)
	NewToken(user *entities.User) (*entities.AuthToken, error)
	SetCredential(userId string, credential *entities.Credential) error
	VerifyCredential(userId string, credential *entities.Credential) error
	LoginByEmail(email string, credential *entities.Credential) (*entities.AuthToken, error)
	GetRecoveryKey(email string) (*entities.RecoveryKey, error)
	SetRecoveryKey(email string) (*entities.RecoveryKey, error)
	SendPasswordRecoveryInstructions(email string) error
}

func New

func New(db driver.Database) (Service, error)

Jump to

Keyboard shortcuts

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