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.
Click to show internal directories.
Click to hide internal directories.