sessiondata

package
v1.1.17 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2026 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package sessiondata holds the session keys and helpers shared by the admin area and the public handler (which needs to recognize logged-in editors for in-place editing).

Index

Constants

View Source
const (
	KeyUserID = "cmsUserID"
	KeyCSRF   = "cmsCSRFToken"
	KeyFlash  = "cmsFlash"
)

Variables

This section is empty.

Functions

func EnsureCSRF

func EnsureCSRF(ctx context.Context, sessions *scs.SessionManager) (string, error)

EnsureCSRF returns the session's CSRF token, generating and storing one if the session doesn't have one yet.

Types

This section is empty.

Jump to

Keyboard shortcuts

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