middleware

package
v0.0.0-...-dbd0312 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package middleware defines intermediate processing for requests such as auth and cpntext retrieval

Index

Constants

View Source
const UserContextKey contextKey = "user"

Variables

This section is empty.

Functions

func GetUserFromContext

func GetUserFromContext(ctx context.Context) *utils.Claims

func NewCORS

func NewCORS() *cors.Cors

NewCORS returns a configured CORS middleware

Types

type AuthMiddleware

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

func NewAuthMiddleware

func NewAuthMiddleware(jwtUtil *utils.JWTUtil) *AuthMiddleware

func (*AuthMiddleware) Auth

Jump to

Keyboard shortcuts

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