This is an automated email from the ASF dual-hosted git repository.
mbrohl pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/ofbiz-plugins.git The following commit(s) were added to refs/heads/trunk by this push: new 40096fd Improved: Switch from jCenter to mavenCentral to handle the jCenter shutdown (OFBIZ-12171) 40096fd is described below commit 40096fd96482c71ba63754d1dc139111fa2ad96c Author: Michael Brohl <[hidden email]> AuthorDate: Wed Feb 10 00:58:20 2021 +0100 Improved: Switch from jCenter to mavenCentral to handle the jCenter shutdown (OFBIZ-12171) See comments in framework build.gradle for details. --- ldap/build.gradle | 2 +- .../activedirectory/OFBizActiveDirectoryAuthenticationHandler.java | 6 ++++-- .../apache/ofbiz/ldap/openldap/OFBizLdapAuthenticationHandler.java | 6 ++++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/ldap/build.gradle b/ldap/build.gradle index 2998efc..5a6f1ca 100644 --- a/ldap/build.gradle +++ b/ldap/build.gradle @@ -18,5 +18,5 @@ */ dependencies { - pluginLibsCompile 'org.jasig.cas:cas-server-core:3.3.5' // So far we did not update from 3.3.5 because of a compile issue. You may try w/ a newer version than 4.2.7 + pluginLibsCompile 'org.apereo.cas:cas-server-support-ldap-core:5.0.10' // So far we did not update from 3.3.5 because of a compile issue. You may try w/ a newer version than 4.2.7 } diff --git a/ldap/src/main/java/org/apache/ofbiz/ldap/activedirectory/OFBizActiveDirectoryAuthenticationHandler.java b/ldap/src/main/java/org/apache/ofbiz/ldap/activedirectory/OFBizActiveDirectoryAuthenticationHandler.java index 78fbea7..a515e28 100644 --- a/ldap/src/main/java/org/apache/ofbiz/ldap/activedirectory/OFBizActiveDirectoryAuthenticationHandler.java +++ b/ldap/src/main/java/org/apache/ofbiz/ldap/activedirectory/OFBizActiveDirectoryAuthenticationHandler.java @@ -29,7 +29,8 @@ import javax.naming.directory.InitialDirContext; import javax.naming.directory.SearchControls; import javax.naming.directory.SearchResult; -import org.jasig.cas.util.LdapUtils; +import org.apereo.cas.util.LdapUtils; +import org.ldaptive.LdapEntry; import org.apache.ofbiz.base.util.UtilXml; import org.apache.ofbiz.ldap.commons.AbstractOFBizAuthenticationHandler; import org.w3c.dom.Element; @@ -91,7 +92,8 @@ public final class OFBizActiveDirectoryAuthenticationHandler extends AbstractOFB } String filter = UtilXml.childElementValue(rootElement, "Filter", "(objectclass=*)"); String attribute = UtilXml.childElementValue(rootElement, "Attribute", "uid=%u"); - attribute = LdapUtils.getFilterWithValues(attribute, username); + LdapEntry entry = new LdapEntry(username); + attribute = LdapUtils.getString(entry, attribute); NamingEnumeration<SearchResult> answer = ctx.search(baseDN, // Filter expression "(&(" + filter + ") (" + attribute + "))", diff --git a/ldap/src/main/java/org/apache/ofbiz/ldap/openldap/OFBizLdapAuthenticationHandler.java b/ldap/src/main/java/org/apache/ofbiz/ldap/openldap/OFBizLdapAuthenticationHandler.java index 2a8c071..2e43ca8 100644 --- a/ldap/src/main/java/org/apache/ofbiz/ldap/openldap/OFBizLdapAuthenticationHandler.java +++ b/ldap/src/main/java/org/apache/ofbiz/ldap/openldap/OFBizLdapAuthenticationHandler.java @@ -27,7 +27,8 @@ import javax.naming.directory.DirContext; import javax.naming.directory.InitialDirContext; import javax.naming.directory.SearchControls; import javax.naming.directory.SearchResult; -import org.jasig.cas.util.LdapUtils; +import org.apereo.cas.util.LdapUtils; +import org.ldaptive.LdapEntry; import org.apache.ofbiz.base.util.UtilXml; import org.apache.ofbiz.ldap.commons.AbstractOFBizAuthenticationHandler; import org.w3c.dom.Element; @@ -76,7 +77,8 @@ public final class OFBizLdapAuthenticationHandler extends AbstractOFBizAuthentic } String filter = UtilXml.childElementValue(rootElement, "Filter", "(objectclass=*)"); String attribute = UtilXml.childElementValue(rootElement, "Attribute", "uid=%u"); - attribute = LdapUtils.getFilterWithValues(attribute, username); + LdapEntry entry = new LdapEntry(username); + attribute = LdapUtils.getString(entry, attribute); NamingEnumeration<SearchResult> answer = ctx.search(baseDN, // Filter expression "(&(" + filter + ") (" + attribute + "))", |
Free forum by Nabble | Edit this page |