csrf

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler interface {
	Handler(h fasthttp.RequestHandler) fasthttp.RequestHandler
	RotateTokenHandler(ctx *fasthttp.RequestCtx)
}

type RedisHandler

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

func NewRedisHandler

func NewRedisHandler(client *redis.Client) *RedisHandler

func (*RedisHandler) Handler

Handler will check each request of defined HTTP methods for CSRF token and rotate the new CSRF token as the response

func (*RedisHandler) RotateTokenHandler

func (r *RedisHandler) RotateTokenHandler(ctx *fasthttp.RequestCtx)

RotateTokenHandler configure CSRF cookie for next request validation

Jump to

Keyboard shortcuts

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