Scenes SupportedOFBiz-CAS-LDAP component supports the following scenes: OFBiz-CAS-OpenLDAP, OFBiz-CAS-ActiveDirectory, OFBiz-OpenLDAP and OFBiz-ActiveDirectory. OFBiz-CAS-LDAP Login Procedure The new OFBiz login procedure as following:
OFBiz-CAS Logout ProcedureThe new OFBiz logout procedure as following: Deploy OFBiz-CAS-LDAP Component in OFBiz 4.0Here are the steps on deploying OFBiz-CAS-LDAP Component in OFBiz 4.0:
specialpurpose/build.xml <!-- Security Mappings --> <request-map uri="checkLogin" edit="false"> <description>Verify a user is logged in.</description> <security https="true" auth="false"/> <event type="java" path="cn.langhua.ofbiz.ldap.LdapLoginWorker" invoke="checkLogin" /> <response name="success" type="view" value="main" /> <response name="error" type="view" value="login" /> </request-map> <request-map uri="login"> <security https="true" auth="false"/> <event type="java" path="cn.langhua.ofbiz.ldap.LdapLoginWorker" invoke="login"/> <response name="success" type="view" value="main"/> <response name="error" type="view" value="login"/> </request-map> <request-map uri="logout"> <security https="true" auth="true"/> <event type="java" path="cn.langhua.ofbiz.ldap.LdapLoginWorker" invoke="logout"/> <response name="success" type="request" value="checkLogin"/> <response name="error" type="view" value="main"/> </request-map> <!-- End of Security Mappings -->
ConfigurationThe component can be configed by $(ofbiz.home)/specialpurpose/ldap/config/ldap.xml. Here is a sample of its content: specialpurpose/build.xml <?xml version="1.0" encoding="UTF-8"?> <ldap> <!-- common configuration --> <Attribute>uid=%u</Attribute> <AuthenType>simple</AuthenType> <AuthenticationHandler>cn.langhua.ofbiz.ldap.cas.OFBizCasAuthenticationHandler</AuthenticationHandler> <AutoPartyId>admin</AutoPartyId> <AutoSecurityGroupId>FULLADMIN</AutoSecurityGroupId> <BaseDN>o=chinare,o=org,c=cn</BaseDN> <Filter>(objectclass=*)</Filter> <Scope>sub</Scope> <URL>ldap://localhost:389</URL> <UseOFBizLoginWhenLDAPFail>true</UseOFBizLoginWhenLDAPFail> <!-- for CAS-LDAP --> <CasLoginUri>/login</CasLoginUri> <CasLogoutUri>/logout</CasLogoutUri> <CasUrl>https://cms.chinare.org.cn:8444/cas</CasUrl> <CasValidateUri>/validate</CasValidateUri> <CasLdapHandler>cn.langhua.ofbiz.ldap.openldap.OFBizLdapAuthenticationHandler</CasLdapHandler> <!-- for MS Active Directory --> <SearchType/> <UserDNForSearch/> <PasswordForSearch/> </ldap> Currently, there are 3 AuthenticationHandlers:
Enjoy it. |


