openldap,activedirectory密码验证支持

openldap,activedirectory密码验证支持,需要先完成用户同步
This commit is contained in:
MaxKey
2021-03-26 20:04:25 +08:00
parent 1b25e476ae
commit 237ec64787
8 changed files with 136 additions and 48 deletions

View File

@@ -101,9 +101,9 @@ public class LdapUtils {
// connect to ldap server
public DirContext openConnection() {
_logger.info("PROVIDER_URL:" + providerUrl);
_logger.info("SECURITY_PRINCIPAL:" + principal);
_logger.info("SECURITY_CREDENTIALS:" + credentials);
_logger.debug("PROVIDER_URL:" + providerUrl);
_logger.debug("SECURITY_PRINCIPAL:" + principal);
_logger.trace("SECURITY_CREDENTIALS:" + credentials);
// LDAP
Properties props = new Properties();
props.setProperty(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");