auth

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth

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

func New

func New(log *slog.Logger, p UserRepo, jwt jwt.Config) *Auth

func (*Auth) LoginUser

func (a *Auth) LoginUser(
	ctx context.Context, req dto.LoginReq,
) (*dto.JWT, error)

func (*Auth) RefreshToken

func (a *Auth) RefreshToken(
	ctx context.Context, req dto.RefreshReq,
) (accessToken string, err error)

func (*Auth) RegisterUser

func (a *Auth) RegisterUser(
	ctx context.Context, req dto.RegisterReq,
) (string, error)

type UserRepo

type UserRepo interface {
	ser.UserSaver
	ser.UserGetter
}

Jump to

Keyboard shortcuts

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