middlewares

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAuthUser

func GetAuthUser(r *http.Request) (*auth.UserJWTClaims, bool)

GetAuthUser retrieves user claims from request context.

func GetAuthUserID

func GetAuthUserID(r *http.Request) (*uuid.UUID, bool)

GetAuthUserID retrieves user ID from request context.

func UnifiedAuthMiddleware

func UnifiedAuthMiddleware(db *gorm.DB) func(http.Handler) http.Handler

UnifiedAuthMiddleware validates either API key or cookie authentication.

Types

type UserContextKey

type UserContextKey string

UserContextKey is the key for user information in request context.

const UserKey UserContextKey = "user"

Jump to

Keyboard shortcuts

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