cookiestore

package
v1.17.0 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package cookiestore provies an abstraction on top of the existing cookie store to handle hot-reloading of cookie HMAC and encryption keys.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(fn EntropyFunc, opts *sessions.Options) sessions.Store

New returns a new session store

Types

type EntropyFunc

type EntropyFunc func() ([][]byte, error)

EntropyFunc is a function that returns the cookie hash and encryption keys. The first 32 bytes are the encryption key, the remaining bytes are the HMAC key.

type HotCodec

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

HotCodec is a securecookie Codec that supports hot-loading its hash and encryption keys.

func (*HotCodec) Decode

func (c *HotCodec) Decode(name, value string, dst interface{}) error

Decode implements securecookie Codec.

func (*HotCodec) Encode

func (c *HotCodec) Encode(name string, value interface{}) (string, error)

Encode implements securecookie Codec.

Jump to

Keyboard shortcuts

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