csrf

package
v0.3.11 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const ContextKey string = "phx-csrf"
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, cipher core.Cypher) *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