|
|
@ -143,7 +143,7 @@ class SessionAutoConfigurationTests extends AbstractSessionAutoConfigurationTest
|
|
|
|
.withPropertyValues("server.servlet.session.cookie.name=sid",
|
|
|
|
.withPropertyValues("server.servlet.session.cookie.name=sid",
|
|
|
|
"server.servlet.session.cookie.domain=spring", "server.servlet.session.cookie.path=/test",
|
|
|
|
"server.servlet.session.cookie.domain=spring", "server.servlet.session.cookie.path=/test",
|
|
|
|
"server.servlet.session.cookie.httpOnly=false", "server.servlet.session.cookie.secure=false",
|
|
|
|
"server.servlet.session.cookie.httpOnly=false", "server.servlet.session.cookie.secure=false",
|
|
|
|
"server.servlet.session.cookie.maxAge=10s")
|
|
|
|
"server.servlet.session.cookie.maxAge=10s", "server.servlet.session.cookie.sameSite=strict")
|
|
|
|
.run((context) -> {
|
|
|
|
.run((context) -> {
|
|
|
|
DefaultCookieSerializer cookieSerializer = context.getBean(DefaultCookieSerializer.class);
|
|
|
|
DefaultCookieSerializer cookieSerializer = context.getBean(DefaultCookieSerializer.class);
|
|
|
|
assertThat(cookieSerializer).hasFieldOrPropertyWithValue("cookieName", "sid");
|
|
|
|
assertThat(cookieSerializer).hasFieldOrPropertyWithValue("cookieName", "sid");
|
|
|
@ -152,6 +152,7 @@ class SessionAutoConfigurationTests extends AbstractSessionAutoConfigurationTest
|
|
|
|
assertThat(cookieSerializer).hasFieldOrPropertyWithValue("useHttpOnlyCookie", false);
|
|
|
|
assertThat(cookieSerializer).hasFieldOrPropertyWithValue("useHttpOnlyCookie", false);
|
|
|
|
assertThat(cookieSerializer).hasFieldOrPropertyWithValue("useSecureCookie", false);
|
|
|
|
assertThat(cookieSerializer).hasFieldOrPropertyWithValue("useSecureCookie", false);
|
|
|
|
assertThat(cookieSerializer).hasFieldOrPropertyWithValue("cookieMaxAge", 10);
|
|
|
|
assertThat(cookieSerializer).hasFieldOrPropertyWithValue("cookieMaxAge", 10);
|
|
|
|
|
|
|
|
assertThat(cookieSerializer).hasFieldOrPropertyWithValue("sameSite", "Strict");
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|