auth

package
v0.0.0-...-a6764fa Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const CtxLoginKey = "user"

Variables

View Source
var (
	ErrUserNotFound              = errors.New("user not found")
	ErrInvalidAccessToken        = errors.New("invalid access token")
	ErrMismatchedHashAndPassword = errors.New("mismatched hash and password")
)

Functions

This section is empty.

Types

type LoginRepository

type LoginRepository interface {
	CreateLogin(ctx context.Context, passwordHash string) (string, error)
	GetPasswordHash(ctx context.Context, accountId string) (string, error)
}

type UseCase

type UseCase interface {
	SignUp(ctx context.Context, password string) (string, error)
	SignIn(ctx context.Context, accountId, password string) (string, error)
	ParseToken(ctx context.Context, accessToken string) (string, error)
}

Directories

Path Synopsis
delivery
repository

Jump to

Keyboard shortcuts

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