From b2c9204af61d56ac8cf486e4f30a8f5e8b6cb742 Mon Sep 17 00:00:00 2001 From: Ivan Subotic <400790+subotic@users.noreply.github.com> Date: Fri, 17 Dec 2021 00:17:04 +0100 Subject: [PATCH] fix(authentication): delete cookie (in chrome) on logout (DEV-325) (#1970) --- .../main/scala/org/knora/webapi/routing/Authenticator.scala | 3 ++- .../org/knora/webapi/e2e/v1/AuthenticationV1E2ESpec.scala | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/webapi/src/main/scala/org/knora/webapi/routing/Authenticator.scala b/webapi/src/main/scala/org/knora/webapi/routing/Authenticator.scala index 95c647d6ae..b523b4c2b7 100644 --- a/webapi/src/main/scala/org/knora/webapi/routing/Authenticator.scala +++ b/webapi/src/main/scala/org/knora/webapi/routing/Authenticator.scala @@ -327,7 +327,8 @@ trait Authenticator extends InstrumentationSupport { domain = cookieDomain, path = Some("/"), httpOnly = true, - expires = Some(DateTime(1970, 1, 1, 0, 0, 0)) + expires = Some(DateTime(1970, 1, 1, 0, 0, 0)), + maxAge = Some(0) ) ) ), diff --git a/webapi/src/test/scala/org/knora/webapi/e2e/v1/AuthenticationV1E2ESpec.scala b/webapi/src/test/scala/org/knora/webapi/e2e/v1/AuthenticationV1E2ESpec.scala index 5967a9eade..dec5b34626 100644 --- a/webapi/src/test/scala/org/knora/webapi/e2e/v1/AuthenticationV1E2ESpec.scala +++ b/webapi/src/test/scala/org/knora/webapi/e2e/v1/AuthenticationV1E2ESpec.scala @@ -162,7 +162,8 @@ class AuthenticationV1E2ESpec domain = Some(settings.cookieDomain), path = Some("/"), httpOnly = true, - expires = Some(DateTime(1970, 1, 1, 0, 0, 0)) + expires = Some(DateTime(1970, 1, 1, 0, 0, 0)), + maxAge = Some(0) ) ) )