activeDirectoryRealm.principalSuffix isn't honoured

This commit is contained in:
Prabhjyot Singh 2016-06-14 13:49:10 +05:30
parent 293853e874
commit 188ac170c7

View file

@ -108,8 +108,12 @@ public class ActiveDirectoryGroupRealm extends AbstractLdapRealm {
LdapContext ctx = null;
try {
String userPrincipalName = upToken.getUsername();
if (this.principalSuffix != null) {
userPrincipalName = upToken.getUsername() + this.principalSuffix;
}
ctx = ldapContextFactory.getLdapContext(
upToken.getUsername(), upToken.getPassword());
userPrincipalName, upToken.getPassword());
} finally {
LdapUtils.closeContext(ctx);
}