Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
63df767bee | ||
|
|
e7f198427b | ||
|
|
38419ef257 |
@@ -18,6 +18,7 @@
|
||||
*/
|
||||
|
||||
import org.apache.ofbiz.base.util.UtilProperties
|
||||
import org.apache.ofbiz.base.util.UtilHttp
|
||||
import org.apache.ofbiz.base.util.UtilMisc
|
||||
import org.apache.ofbiz.product.store.ProductStoreWorker
|
||||
|
||||
@@ -54,5 +55,5 @@ if (userInfoMap) {
|
||||
request.getSession().setAttribute("userInfoMap", userInfoMap)
|
||||
}
|
||||
|
||||
donePage = "main;" + parameters.visit.sessionId
|
||||
donePage = "main;" + UtilHttp.getSessionId(request)
|
||||
context.donePage = donePage
|
||||
|
||||
+1
-1
@@ -18,5 +18,5 @@
|
||||
*/
|
||||
|
||||
dependencies {
|
||||
pluginLibsCompile 'org.jasig.cas:cas-server-core:3.3.5'
|
||||
pluginLibsCompile 'org.apereo.cas:cas-server-support-ldap-core:5.0.10'
|
||||
}
|
||||
+4
-2
@@ -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 +"))",
|
||||
|
||||
+4
-2
@@ -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 +"))",
|
||||
|
||||
Reference in New Issue
Block a user