com.konakartadmin.bl
Class AdminLDAPMgr

java.lang.Object
  extended by com.konakartadmin.bl.AdminBaseMgr
      extended by com.konakartadmin.bl.AdminLDAPMgr
All Implemented Interfaces:
AdminLDAPMgrIf

public class AdminLDAPMgr
extends AdminBaseMgr
implements AdminLDAPMgrIf

Called when LDAP is enabled to use LDAP for authenticating the user


Nested Class Summary
 
Nested classes/interfaces inherited from class com.konakartadmin.bl.AdminBaseMgr
AdminBaseMgr.StaticData
 
Field Summary
protected static org.apache.commons.logging.Log log
          the log
 
Fields inherited from class com.konakartadmin.bl.AdminBaseMgr
adminEng, baseMgrMutex, baseStaticDataHM, cDataEnd, cDataStart, kkConf, kkInstanceId, mgrFactory, STORE_ID, templateBaseDir
 
Constructor Summary
AdminLDAPMgr(KKAdminIf eng)
          Constructor used when instantiated by the application engine
 
Method Summary
 int checkCredentials(java.lang.String emailAddr, java.lang.String password)
          Called if the LDAP module is installed and active.
 
Methods inherited from class com.konakartadmin.bl.AdminBaseMgr
addInsertAttr, addInsertAttr, checkIntIsSet, checkRequired, getAdminAddressMgr, getAdminAuditMgr, getAdminBillingMgr, getAdminBookableProductMgr, getAdminCatMgr, getAdminConfigMgr, getAdminCurrMgr, getAdminCustMgr, getAdminCustTagMgr, getAdminEmailMgr, getAdminEng, getAdminHtmlMgr, getAdminLanguageMgr, getAdminManuMgr, getAdminMessageMgr, getAdminMiscItemMgr, getAdminModulesMgr, getAdminMultiStoreMgr, getAdminOrderMgr, getAdminPdfMgr, getAdminProdAttrMgr, getAdminProdMgr, getAdminPromMgr, getAdminPublishProdMgr, getAdminReviewMgr, getAdminSearchRuleMgr, getAdminSecMgr, getAdminSolrMgr, getAdminStoreMgr, getAdminTagMgr, getAdminTaxMgr, getAdminValidationMgr, getAdminVelocityContextMgr, getAdminWishListMgr, getBooleanFromString, getExportXMLData, getIntFromString, getKkConfig, getKkInstanceId, getMode, getModeString, getMqMgr, getNewCriteria, getNewCriteria, getPostSearchText, getPreSearchText, getPropertyValue, getRecordCount, getRewardPointMgr, getSingleIntResult, getStoreId, getTemplate, getTemplateBase, getXml_io, init, isConfigSet, isEnterprise, isMultiStoreLanguagesShared, isMultiStoreMode, isMultiStoreShareCategories, isMultiStoreShareCustomers, isMultiStoreShareProducts, isMultiStoreSingleDBCSMode, isMultiStoreSingleDBMode, isMultiStoreSingleDBNonCSMode, manageException, refreshConfigs, removeCData, setAdminEng, setupWildCardRules, setWildCardAfter, setWildCardBefore, shutdownGracefully, shutdownGracefully, timestampStr
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static org.apache.commons.logging.Log log
the log

Constructor Detail

AdminLDAPMgr

public AdminLDAPMgr(KKAdminIf eng)
             throws java.lang.Exception
Constructor used when instantiated by the application engine

Parameters:
eng - Application engine
Throws:
java.lang.Exception
Method Detail

checkCredentials

public int checkCredentials(java.lang.String emailAddr,
                            java.lang.String password)
                     throws KKAdminException
Called if the LDAP module is installed and active. This method should return: This method may need to be modified slightly depending on the structure of your LDAP. The example works when importing the exampleData.ldif file in the LDAP module jar: dn: cn=Robert Smith,ou=people,dc=example,dc=com
objectclass: inetOrgPerson
cn: Robert Smith
cn: Robert J Smith
cn: bob smith
sn: smith
uid: rjsmith
userpassword: rJsmitH
carlicense: HISCAR 123
homephone: 555-111-2222
mail: [email protected]
mail: [email protected]
mail: [email protected]
description: swell guy
The code attempts to connect to LDAP using the username, password and URL in the configuration variables set when the module was installed through the admin app.
After having connected, the person object is searched for using the email address of the user. If found we use the "cn" attribute and the password of the user to attempt to bind to LDAP. If the bind is successful, we return a positive number which means that authentication was successful.

Specified by:
checkCredentials in interface AdminLDAPMgrIf
Parameters:
emailAddr - The user name required to log in
password - The log in password
Returns:
Returns an integer
Throws:
KKAdminException


Copyright © 2011 DS Data Systems UK Ltd.