Search in sources :

Example 6 with DefaultCookieSerializer

use of org.springframework.session.web.http.DefaultCookieSerializer in project spring-boot by spring-projects.

the class SessionAutoConfigurationTests method autoConfiguredCookieSerializerIsConfiguredWithRememberMeRequestAttribute.

@Test
void autoConfiguredCookieSerializerIsConfiguredWithRememberMeRequestAttribute() {
    this.contextRunner.withBean(SpringSessionRememberMeServicesConfiguration.class).run((context) -> {
        DefaultCookieSerializer cookieSerializer = context.getBean(DefaultCookieSerializer.class);
        assertThat(cookieSerializer).hasFieldOrPropertyWithValue("rememberMeRequestAttribute", SpringSessionRememberMeServices.REMEMBER_ME_LOGIN_ATTR);
    });
}
Also used : DefaultCookieSerializer(org.springframework.session.web.http.DefaultCookieSerializer) Test(org.junit.jupiter.api.Test)

Aggregations

DefaultCookieSerializer (org.springframework.session.web.http.DefaultCookieSerializer)6 Test (org.junit.jupiter.api.Test)3 Test (org.junit.Test)2 CookieHttpSessionIdResolver (org.springframework.session.web.http.CookieHttpSessionIdResolver)2 SessionRepositoryFilter (org.springframework.session.web.http.SessionRepositoryFilter)2 Bean (org.springframework.context.annotation.Bean)1