middleware

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const TraceIdHeader = "X-Request-Id"

Variables

This section is empty.

Functions

func AddRequestIdToContextAndResponse

func AddRequestIdToContextAndResponse(next http.Handler) http.Handler

func CorsHandling

func CorsHandling(next http.Handler) http.Handler

func PanicRecoverer

func PanicRecoverer(next http.Handler) http.Handler

func RequestLogger

func RequestLogger(next http.Handler) http.Handler

func TokenValidator

func TokenValidator(next http.Handler) http.Handler

Types

type AllClaims

type AllClaims struct {
	jwt.RegisteredClaims
	CustomClaims
}

type CustomClaims

type CustomClaims struct {
	Email         string   `json:"email"`
	EmailVerified bool     `json:"email_verified"`
	Groups        []string `json:"groups,omitempty"`
	Name          string   `json:"name"`
}

Jump to

Keyboard shortcuts

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