middles

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2026 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSession

GetSession extracts the user session out of the http.Request, which will be an implementation of identity.UserSession.

If on session is found, an implementation of identity.UserSession where .Active() always returns false is returned, indicating there is no session.

Types

type Sessions

type Sessions[I identity.UserIdentity] interface {
	Create(I, time.Duration) *http.Cookie
	Match(I, *conceal.Text) error
}

type SetSession

type SetSession[D identity.UserData[I], I identity.UserIdentity] struct {
	SessionCookieName string
	Sessions          Sessions[I]
	Next              http.Handler
}

func (*SetSession[D, I]) ServeHTTP

func (ss *SetSession[D, I]) ServeHTTP(w http.ResponseWriter, r *http.Request)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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