services

package
v0.0.0-...-bd9fb2d Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	UserPasswordAuthFlow = "USER_PASSWORD_AUTH"
	TokenAuthFlow        = "REFRESH_TOKEN_AUTH"
	UserCtxKey           = "USER"
)

Functions

This section is empty.

Types

type Auth

type Auth interface {
	SignUp(in *dto.SignUpDTO) error
	Login(in *dto.LoginDTO) (*string, error)
	Confirm(in *dto.ConfirmDTO) error
	CheckIdentityMiddleware(*gin.Context)
	GetUserByName(username string) (*dto.UserDTO, error)
	Logout(token string) error
}

type AuthService

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

func (*AuthService) CheckIdentityMiddleware

func (a *AuthService) CheckIdentityMiddleware(ctx *gin.Context)

func (*AuthService) Confirm

func (a *AuthService) Confirm(in *dto.ConfirmDTO) error

func (*AuthService) GetUserByName

func (a *AuthService) GetUserByName(username string) (*dto.UserDTO, error)

func (*AuthService) Login

func (a *AuthService) Login(in *dto.LoginDTO) (*string, error)

func (*AuthService) Logout

func (a *AuthService) Logout(username string) error

func (*AuthService) SignUp

func (a *AuthService) SignUp(in *dto.SignUpDTO) error

type CognitoJWTValidator

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

func (*CognitoJWTValidator) Validate

func (v *CognitoJWTValidator) Validate(jwtToken string) (string, error)

type JWTValidator

type JWTValidator interface {
	Validate(string) (string, error)
}

func NewJWTValidator

func NewJWTValidator(cfg *config.Env) JWTValidator

Jump to

Keyboard shortcuts

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