Documentation ¶
Index ¶
- type CSRFMiddleware
- func (m CSRFMiddleware) FormKey() string
- func (m CSRFMiddleware) Handle(next clevergo.Handler) clevergo.Handler
- func (m CSRFMiddleware) HeaderKey() string
- func (m CSRFMiddleware) Key() string
- func (m CSRFMiddleware) Len() int
- func (m CSRFMiddleware) MaskLen() int
- func (m CSRFMiddleware) SessionKey() string
- func (m *CSRFMiddleware) SetErrorHandler(handler clevergo.HandlerFunc)
- func (m *CSRFMiddleware) SetFormKey(key string)
- func (m *CSRFMiddleware) SetHeaderKey(key string)
- func (m *CSRFMiddleware) SetKey(key string)
- func (m *CSRFMiddleware) SetLen(len int)
- func (m *CSRFMiddleware) SetMaskLen(len int)
- func (m *CSRFMiddleware) SetSafeMethods(methods []string)
- func (m *CSRFMiddleware) SetSessionKey(key string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CSRFMiddleware ¶
type CSRFMiddleware struct {
// contains filtered or unexported fields
}
CSRFMiddleware Cross Site Request Forgery Protection Middleware.
func NewCSRFMiddleware ¶
func NewCSRFMiddleware() CSRFMiddleware
NewCSRFMiddleware returns CSRF Middleware instance.
func (CSRFMiddleware) Handle ¶
func (m CSRFMiddleware) Handle(next clevergo.Handler) clevergo.Handler
Handle implemented the Middleware Interface.
func (CSRFMiddleware) HeaderKey ¶
func (m CSRFMiddleware) HeaderKey() string
HeaderKey returns headerKey.
func (CSRFMiddleware) MaskLen ¶
func (m CSRFMiddleware) MaskLen() int
MaskLen returns mask's length.
func (CSRFMiddleware) SessionKey ¶
func (m CSRFMiddleware) SessionKey() string
SessionKey returns sessionKey.
func (*CSRFMiddleware) SetErrorHandler ¶
func (m *CSRFMiddleware) SetErrorHandler(handler clevergo.HandlerFunc)
SetErrorHandler for setting error handler.
func (*CSRFMiddleware) SetFormKey ¶
func (m *CSRFMiddleware) SetFormKey(key string)
SetFormKey for setting formKey.
func (*CSRFMiddleware) SetHeaderKey ¶
func (m *CSRFMiddleware) SetHeaderKey(key string)
SetHeaderKey for setting headerKey.
func (*CSRFMiddleware) SetLen ¶
func (m *CSRFMiddleware) SetLen(len int)
SetLen for setting token's length.
func (*CSRFMiddleware) SetMaskLen ¶
func (m *CSRFMiddleware) SetMaskLen(len int)
SetMaskLen for setting mask's length.
func (*CSRFMiddleware) SetSafeMethods ¶
func (m *CSRFMiddleware) SetSafeMethods(methods []string)
SetSafeMethods for set safe methods.
func (*CSRFMiddleware) SetSessionKey ¶
func (m *CSRFMiddleware) SetSessionKey(key string)
SetSessionKey for setting sessionKey.
Click to show internal directories.
Click to hide internal directories.