auth

package
v0.0.0-...-71cacd3 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EchoContextFromContext

func EchoContextFromContext(ctx context.Context) (*echo.Context, error)

func GenAccessToken

func GenAccessToken(ctx context.Context, userID uuid.UUID) (string, error)

func GenRfreshToken

func GenRfreshToken(ctx context.Context, userID uuid.UUID) (string, error)

func JWTMiddleware

func JWTMiddleware() echo.MiddlewareFunc

func JwtValidate

func JwtValidate(ctx context.Context, token string) (*jwt.Token, error)

Types

type CustomContext

type CustomContext struct {
	echo.Context
	// contains filtered or unexported fields
}

type JwtCustomClaim

type JwtCustomClaim struct {
	ID uuid.UUID
	jwt.StandardClaims
}

func CtxValue

func CtxValue(ctx context.Context) *JwtCustomClaim

Jump to

Keyboard shortcuts

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