public interface LDAPMgrIf
Modifier and Type | Method and Description |
---|---|
int |
checkCredentials(java.lang.String emailAddr,
java.lang.String password)
Called if the LDAP module is installed and active.
|
int checkCredentials(java.lang.String emailAddr, java.lang.String password) throws com.konakart.app.KKException
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: r.smith@example.com
mail: rsmith@example.com
mail: bob.smith@example.com
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.
emailAddr
- The user name required to log inpassword
- The log in passwordcom.konakart.app.KKException
- an unexpected KKException exceptionCopyright © 2018 DS Data Systems UK Ltd.