auth

package
v0.0.0-...-b27b957 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: BSD-3-Clause Imports: 14 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) (string, error)
	SetRecoveryKey(email string) (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