csrf

package
v1.0.0-rc4 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Kind is the kind of Fallback.
	Kind = constant.HTTPCsrfFilter
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Key           string   `yaml:"key" json:"key" mapstructure:"key"`                                  // get request key
	Secret        string   `yaml:"secret" json:"secret" mapstructure:"secret"`                         // private key
	ErrorMsg      string   `yaml:"error_msg" json:"error_msg" mapstructure:"error_msg"`                // hint error info
	IgnoreMethods []string `yaml:"ignore_methods" json:"ignore_methods" mapstructure:"ignore_methods"` // ignore request method
}

Config describe the config of FilterFactory

type Filter

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

func (*Filter) Decode

func (f *Filter) Decode(ctx *http.HttpContext) filter.FilterStatus

type FilterFactory

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

FilterFactory is http filter instance

func (*FilterFactory) Apply

func (factory *FilterFactory) Apply() error

func (*FilterFactory) Config

func (factory *FilterFactory) Config() interface{}

func (*FilterFactory) PrepareFilterChain

func (factory *FilterFactory) PrepareFilterChain(ctx *http.HttpContext, chain filter.FilterChain) error

type Plugin

type Plugin struct {
}

Plugin is http filter plugin.

func (*Plugin) CreateFilterFactory

func (p *Plugin) CreateFilterFactory() (filter.HttpFilterFactory, error)

func (*Plugin) Kind

func (p *Plugin) Kind() string

Jump to

Keyboard shortcuts

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