Thanks a lot in advance for reading this question.
I am using:
spring-security-oauth2:2.0.7.RELEASE
spring-
@dave-syer hint was correct.
I post here the configuration which can be used to setup the RequestContextFilter
and enable spring-session
persistence of spring-security-oauth
objects. In case this can help someone...
@Configuration
public class RequestContextFilterConfiguration {
@Bean
@ConditionalOnMissingBean(RequestContextFilter.class)
public RequestContextFilter requestContextFilter() {
return new RequestContextFilter();
}
@Bean
public FilterRegistrationBean requestContextFilterChainRegistration(
@Qualifier("requestContextFilter") Filter securityFilter) {
FilterRegistrationBean registration = new FilterRegistrationBean(securityFilter);
registration.setOrder(SessionRepositoryFilter.DEFAULT_ORDER + 1);
registration.setName("requestContextFilter");
return registration;
}
}