1
0
mirror of synced 2026-08-04 09:17:02 +00:00

SEC-799: Add better detection of missing server-ref element for <ldap-user-service> and <ldap-authentication-provider />

http://jira.springframework.org/browse/SEC-799. Updated ContextSourceSettingPostProcessor to set the standard ContextSource as an alias if it is needed by a bean but has not been set (because the user specified their own server id on <ldap-server />).
This commit is contained in:
Luke Taylor
2008-04-28 15:01:20 +00:00
parent 270fa92780
commit 2d692718e0
4 changed files with 52 additions and 18 deletions
@@ -75,6 +75,12 @@ public class LdapProviderBeanDefinitionParserTests {
LdapAuthenticationProvider provider = getProvider();
provider.authenticate(new UsernamePasswordAuthenticationToken("ben", "ben"));
}
@Test
public void detectsNonStandardServerId() {
setContext("<ldap-server id='myServer'/> " +
"<ldap-authentication-provider />");
}
private void setContext(String context) {
appCtx = new InMemoryXmlApplicationContext(context);