Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterSessionTypes ¶ added in v0.0.6
func RegisterSessionTypes(types ...any)
RegisterSessionTypes registers those custom types that will be stored in the session.
Types ¶
type Option ¶
type Option func(*sessions.CookieStore)
Option for the session middleware
func WithDomain ¶
Set the domain for the application session This is useful when you want to share the session between subdomains.
func WithHTTPOnly ¶ added in v0.0.10
WithHTTPOnly sets the HttpOnly flag on the session cookie.
func WithMaxAge ¶ added in v0.0.10
WithMaxAge sets the maximum age for the session cookie. A negative value means that the cookie is deleted when the browser is closed.
func WithSameSite ¶ added in v0.0.9
WithSameSite value for the SameSite option on the session cookie.
func WithSecure ¶ added in v0.0.9
WithSecure value for the Secure flag on the session cookie.
func WithSecureFlag ¶ added in v0.0.10
WithSecure sets the Secure flag on the session cookie.
Click to show internal directories.
Click to hide internal directories.