Fixed potential problem with multiple userDn patterns.

This commit is contained in:
Luke Taylor
2006-05-01 00:43:42 +00:00
parent f0b11109b4
commit a7d7631f2f
2 changed files with 34 additions and 17 deletions

View File

@@ -67,6 +67,11 @@ public class PasswordComparisonAuthenticatorTests extends AbstractLdapServerTest
authenticator.authenticate("Bob", "bobspassword");
}
public void testMultipleDnPatternsWorkOk() {
authenticator.setUserDnPatterns(new String[] {"uid={0},ou=nonexistent", "uid={0},ou=people"});
authenticator.authenticate("Bob", "bobspassword");
}
public void testLocalCompareSucceedsWithShaEncodedPassword() {
authenticator = new PasswordComparisonAuthenticator(getInitialCtxFactory());
authenticator.setUserDnPatterns(new String[] {"uid={0},ou=people"});