List of usage examples for org.apache.shiro.realm.ldap DefaultLdapContextFactory DefaultLdapContextFactory
DefaultLdapContextFactory
From source file:org.apache.zeppelin.realm.ActiveDirectoryGroupRealm.java
License:Apache License
public LdapContextFactory getLdapContextFactory() { if (this.ldapContextFactory == null) { if (log.isDebugEnabled()) { log.debug("No LdapContextFactory specified - creating a default instance."); }//www.ja v a 2 s. c om DefaultLdapContextFactory defaultFactory = new DefaultLdapContextFactory(); defaultFactory.setPrincipalSuffix(this.principalSuffix); defaultFactory.setSearchBase(this.searchBase); defaultFactory.setUrl(this.url); defaultFactory.setSystemUsername(this.systemUsername); defaultFactory.setSystemPassword(getSystemPassword()); this.ldapContextFactory = defaultFactory; } return this.ldapContextFactory; }