auth

package
v0.0.0-...-bdbfe35 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckAuth

func CheckAuth(ctx *fiber.Ctx) error

func GenerateToken

func GenerateToken(email, firstName, lastName string) (string, error)

Types

type JwtClaim

type JwtClaim struct {
	Email     string `json:"email"`
	FirstName string `json:"first_name"`
	LastName  string `json:"last_name"`
	jwt.RegisteredClaims
}

type Login

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

func NewLogin

func NewLogin(userQuery domain.UserQuery) *Login

func (*Login) Authenticate

func (l *Login) Authenticate(userCredentials dto.UserCredentials) (*TokenResponse, error)

type TokenResponse

type TokenResponse struct {
	Token string `json:"token"`
}

Jump to

Keyboard shortcuts

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