Add ability to set cookie max age - issue #91

This commit is contained in:
2025-11-12 12:46:41 +00:00
parent ccc6f76b0e
commit e453a15922
22 changed files with 195 additions and 93 deletions
+2 -2
View File
@@ -468,7 +468,7 @@ func TestSessionFixationAttack(t *testing.T) {
tc := newTestCleanup(t)
logger := NewLogger("debug")
sm, err := NewSessionManager("test-secret-key-that-is-at-least-32-bytes", false, "", "", logger)
sm, err := NewSessionManager("test-secret-key-that-is-at-least-32-bytes", false, "", "", 0, logger)
if err != nil {
t.Fatalf("Failed to create session manager: %v", err)
}
@@ -625,7 +625,7 @@ func TestSessionFixationAttack(t *testing.T) {
// TestCSRFProtection tests CSRF protection in POST requests
func TestCSRFProtection(t *testing.T) {
logger := NewLogger("debug")
sm, err := NewSessionManager("test-secret-key-that-is-at-least-32-bytes", false, "", "", logger)
sm, err := NewSessionManager("test-secret-key-that-is-at-least-32-bytes", false, "", "", 0, logger)
if err != nil {
t.Fatalf("Failed to create session manager: %v", err)
}