sessions

command
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Command sessions is a small web application signed in by cookie sessions: user.SessionModeOpaque over sqlitestore, guarded by authithttp.SessionMiddleware and authithttp.CSRFProtect.

go run ./examples/sessions -addr 127.0.0.1:8080 -db /tmp/sessions.db

It serves plain HTTP, for trying it out locally, which is why the cookies are configured with AllowHTTP. Behind a TLS-terminating proxy, drop AllowHTTP (the cookies are then always Secure) or set TrustForwardedProto if the proxy sets X-Forwarded-Proto.

Jump to

Keyboard shortcuts

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