csrf

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const CsrfHeaderName string = "X-Csrf-Token"

Variables

This section is empty.

Functions

This section is empty.

Types

type Csrf

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

func New

func New(expires time.Duration) Csrf

func (Csrf) Check

func (csrf Csrf) Check(token string) bool

func (Csrf) CheckRequest

func (csrf Csrf) CheckRequest(req *http.Request) bool

func (Csrf) Generate

func (csrf Csrf) Generate() string

Jump to

Keyboard shortcuts

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