SEC-1210: RememberMe filter misses UserDetailsService in default <http /> tag config when it is declared in parent app context. Fixed by getting the UserDetailsServiceInjectionPostProcessor to check ancestor bean factories for a UserDetailsService if one isn't found in the current bean factory.

This commit is contained in:
Luke Taylor
2009-07-31 19:40:20 +00:00
parent 160aa512a1
commit c5d6484b54
2 changed files with 33 additions and 3 deletions

View File

@@ -938,6 +938,16 @@ public class HttpSecurityBeanDefinitionParserTests {
assertEquals(Boolean.TRUE, FieldUtils.getFieldValue(filter, "repo.disableUrlRewriting"));
}
@Test
public void userDetailsServiceInParentContextIsLocatedSuccessfully() throws Exception {
appContext = new InMemoryXmlApplicationContext(AUTH_PROVIDER_XML);
appContext = new InMemoryXmlApplicationContext(
"<http auto-config='true'>" +
" <remember-me />" +
"</http>", appContext);
}
private void setContext(String context) {
appContext = new InMemoryXmlApplicationContext(context);
}