csrf

package
v1.8.3 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2024 License: MIT Imports: 9 Imported by: 3

Documentation

Index

Constants

View Source
const (
	// HeaderName is the name of CSRF header
	HeaderName = "X-XSRF-TOKEN"
	// FormFieldName is the name of the form field
	FormFieldName = "csrf_token"
	// CookieName is the name of CSRF cookie
	CookieName = "csrf_token"
	// SessionCookieName the name of the session cookie for angularjs
	SessionCookieName = "XSRF-TOKEN"
)

Variables

This section is empty.

Functions

func Cookie() gin.HandlerFunc

Cookie generates two cookies: a long term csrf token for a user, and a masked session token to verify against

func Verify

func Verify() gin.HandlerFunc

Verify the sent csrf token

Types

This section is empty.

Jump to

Keyboard shortcuts

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