csrf

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2023 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

Generate 生成Token

func Validate

func Validate(token string) (b bool)

Validate 校验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