Enforce baseDn for LDAP provider

This commit is contained in:
Maxime Dor
2017-12-06 20:31:06 +01:00
parent 6ac593f0fa
commit 16690a0329

View File

@@ -162,11 +162,14 @@ public class LdapConfig {
throw new IllegalStateException("LDAP port is not valid"); throw new IllegalStateException("LDAP port is not valid");
} }
if (StringUtils.isBlank(conn.getBaseDn())) {
throw new ConfigurationException("ldap.connection.baseDn");
}
if (StringUtils.isBlank(attribute.getUid().getType())) { if (StringUtils.isBlank(attribute.getUid().getType())) {
throw new IllegalStateException("Attribute UID Type cannot be empty"); throw new IllegalStateException("Attribute UID Type cannot be empty");
} }
if (StringUtils.isBlank(attribute.getUid().getValue())) { if (StringUtils.isBlank(attribute.getUid().getValue())) {
throw new IllegalStateException("Attribute UID value cannot be empty"); throw new IllegalStateException("Attribute UID value cannot be empty");
} }