session

package
v0.0.0-...-598a1f7 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2023 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckAuthenticity

func CheckAuthenticity(w http.ResponseWriter, r *http.Request) error

CheckAuthenticity checks the authenticity token in params against cookie - The masked token is inserted into forms and POSTS by js. The token is inserted into the cookie by the middleware above. This is a shortcut for where you don't need params otherwise.

func CheckAuthenticityToken

func CheckAuthenticityToken(w http.ResponseWriter, r *http.Request, token string) error

checkAuthenticityToken checks for token authenticity directly without params

func Middleware

func Middleware(h http.HandlerFunc) http.HandlerFunc

Middleware sets a token on every GET request so that it can be inserted into the view. It currently ignores requests for files and assets.

Types

This section is empty.

Jump to

Keyboard shortcuts

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