signedCookie

package
v0.0.0-...-1d800d4 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2024 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoCookie           = &errors.UnauthorizedError{Reason: "no cookie found"}
	ErrBadCookieFormat    = &errors.UnauthorizedError{Reason: "bad cookie format"}
	ErrBadCookieSignature = &errors.UnauthorizedError{Reason: "bad cookie signature"}
)

Functions

This section is empty.

Types

type Manager

type Manager interface {
	Get(c *httpUtils.Context) (string, error)
	Set(c *httpUtils.Context, s string)
}

func New

func New(options Options, payloadLength int) Manager

type Options

type Options struct {
	Domain  string        `json:"domain"`
	Expiry  time.Duration `json:"expiry"`
	Name    string        `json:"name"`
	Path    string        `json:"path"`
	Secrets []string      `json:"secrets"`
	Secure  bool          `json:"secure"`
}

func (*Options) FillFromEnv

func (o *Options) FillFromEnv(name string)

func (*Options) Validate

func (o *Options) Validate() error

Jump to

Keyboard shortcuts

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