csrf

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PluginName = "csrf-token"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Policy

type Policy struct {
	apipolicy.BasePolicy
}

func (Policy) CreateDefaultConfig

func (policy Policy) CreateDefaultConfig(gatewayProvider string, ctx map[string]interface{}) apipolicy.PolicyDto

func (Policy) ParseConfig

func (policy Policy) ParseConfig(dto apipolicy.PolicyDto, ctx map[string]interface{}, forValidate bool) (apipolicy.PolicyConfig, error)

func (Policy) UnmarshalConfig

func (policy Policy) UnmarshalConfig(config []byte, gatewayProvider string) (apipolicy.PolicyDto, error, string)

type PolicyDto

type PolicyDto struct {
	apipolicy.BaseDto
	Switch         bool     `json:"switch"`
	UserCookie     string   `json:"userCookie"`
	ExcludedMethod []string `json:"excludedMethod"`
	TokenName      string   `json:"tokenName"`
	TokenDomain    string   `json:"tokenDomain"`
	CookieSecure   bool     `json:"cookieSecure"`
	ValidTTL       int64    `json:"validTTL"`
	RefreshTTL     int64    `json:"refreshTTL"`
	ErrStatus      int64    `json:"errStatus"`
	ErrMsg         string   `json:"errMsg"`
}

func (PolicyDto) IsValidDto

func (dto PolicyDto) IsValidDto(gatewayProvider string) (bool, string)

Jump to

Keyboard shortcuts

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