Add LDAP Auth support with synapse REST Auth module

This commit is contained in:
Maxime Dor
2017-09-05 21:31:36 +02:00
parent 85236793e1
commit 4b0d549dd6
6 changed files with 136 additions and 17 deletions

View File

@@ -1,8 +1,12 @@
package io.kamax.mxisd.config.ldap;
import io.kamax.mxisd.lookup.provider.LdapProvider;
import org.apache.commons.lang.StringUtils;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import javax.annotation.PostConstruct;
@Configuration
@ConfigurationProperties(prefix = "ldap.attribute.uid")
public class LdapAttributeUidConfig {
@@ -26,4 +30,11 @@ public class LdapAttributeUidConfig {
this.value = value;
}
@PostConstruct
public void postConstruct() {
if (!StringUtils.equals(LdapProvider.UID, getType()) && !StringUtils.equals(LdapProvider.MATRIX_ID, getType())) {
throw new IllegalArgumentException("Unsupported LDAP UID type: " + getType());
}
}
}