csrf

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2016 License: MIT Imports: 9 Imported by: 3

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

func Cookie() gin.HandlerFunc

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