usecase

package
v0.0.0-...-8c446f2 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthClaims

type AuthClaims struct {
	jwt.StandardClaims
	User *models.User `json:"user"`
}

type AuthUseCase

type AuthUseCase struct {
	// contains filtered or unexported fields
}

func NewAuthUseCase

func NewAuthUseCase(
	userRepo auth.AuthRepository,
	hashSalt string,
	signingKey []byte,
	tokenTTLSeconds time.Duration,
) *AuthUseCase

func (*AuthUseCase) ParseToken

func (a *AuthUseCase) ParseToken(ctx context.Context, accessToken string) (*models.User, error)

func (*AuthUseCase) SignIn

func (a *AuthUseCase) SignIn(ctx context.Context, username string, password string) (string, error)

func (*AuthUseCase) SignUp

func (a *AuthUseCase) SignUp(ctx context.Context, data *models.User) error

Jump to

Keyboard shortcuts

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