middleware

package
v0.3.10 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2025 License: AGPL-3.0 Imports: 10 Imported by: 3

Documentation

Index

Constants

View Source
const AuthContextKey = "auth"
View Source
const WhoamiEndpoint = "whoami"

Variables

This section is empty.

Functions

func GetAdmin

func GetAdmin(req *http.Request) bool

func GetMember added in v0.3.7

func GetMember(req *http.Request) bool

func GetUser

func GetUser(req *http.Request) (auth.User, error)

func MustGetUser added in v0.3.5

func MustGetUser(req *http.Request) auth.User

Types

type AuthMiddleware

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

func NewAuthMiddleware

func NewAuthMiddleware(authServer string) (mid *AuthMiddleware, err error)

func (*AuthMiddleware) Handler

func (a *AuthMiddleware) Handler(next http.Handler) http.Handler

func (*AuthMiddleware) NonBlockingHandler added in v0.3.5

func (a *AuthMiddleware) NonBlockingHandler(next http.Handler) http.Handler

Jump to

Keyboard shortcuts

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