csrf

package
v0.4.6 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2022 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate() string

生成Token

func Validate

func Validate(token string) (b bool)

校验Token

Types

type TokenManager

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

func NewTokenManager

func NewTokenManager() *TokenManager

func (*TokenManager) Clean

func (this *TokenManager) Clean()

func (*TokenManager) Delete

func (this *TokenManager) Delete(token string)

func (*TokenManager) Exists

func (this *TokenManager) Exists(token string) bool

func (*TokenManager) Put

func (this *TokenManager) Put(token string)

Jump to

Keyboard shortcuts

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