@ -1,5 +1,5 @@
/ *
/ *
* Copyright 2012 - 202 0 the original author or authors .
* Copyright 2012 - 202 1 the original author or authors .
*
*
* Licensed under the Apache License , Version 2.0 ( the "License" ) ;
* Licensed under the Apache License , Version 2.0 ( the "License" ) ;
* you may not use this file except in compliance with the License .
* you may not use this file except in compliance with the License .
@ -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" ) ;
} ) ;
} ) ;
}
}