middleware

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 26, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const UserContextKey = contextKey("user")

Variables

This section is empty.

Functions

func GetUser

func GetUser(r *http.Request) *store.User

func SetUser

func SetUser(r *http.Request, user *store.User) *http.Request

Types

type UserMiddleware

type UserMiddleware struct {
	UserStore store.UserStore
}

func (*UserMiddleware) Authenticate

func (um *UserMiddleware) Authenticate(next http.Handler) http.Handler

func (*UserMiddleware) RequireUser

func (um *UserMiddleware) RequireUser(next http.HandlerFunc) http.HandlerFunc

Jump to

Keyboard shortcuts

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