middleware

package
v0.0.0-...-b696ed4 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Authorization = "Authorization"
)

Functions

func ClaimToken

func ClaimToken(ctx echo.Context) entity.UserClaimsResponse

func GenerateToken

func GenerateToken(registry entity.User) (t string, err error)

func InitMiddlewares

func InitMiddlewares(e *echo.Echo)

func IsPrivate

func IsPrivate(role string, private bool) bool

func IsTokenExpired

func IsTokenExpired(t time.Time) bool

func ParseTokenJWT

func ParseTokenJWT(tokenString string) (userClaims entity.UserClaimsResponse, err error)

func TokenValidationMiddleware

func TokenValidationMiddleware(private bool) echo.MiddlewareFunc

Types

This section is empty.

Jump to

Keyboard shortcuts

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