org.compiere.ldap
Class LdapConnectionHandler
java.lang.Object
java.lang.Thread
org.compiere.ldap.LdapConnectionHandler
- All Implemented Interfaces:
- Runnable
public class LdapConnectionHandler
- extends Thread
LDAP Connection Handler
Only "simple" authentication and the following protocol are supported:
bind
unbind
search
The following distinguished name are supported:
o - organization
ou - organization unit
cn - common name
Due to some of the ldap client might not unbind and close the connection,
whenever error occurs and authenticate done, we will close the connection.
Basically, tested with two type of ldap authentication, java client and
apache ldap support.
For the apache support, here's the tested definition:
AuthType Basic
AuthLDAPAuthoritative on
AuthLDAPEnabled on
AuthLDAPURL ldap://:/o=,ou=?uid?sub
The protocol for the apache ldap:
- bind to server
- search for the object name with user input userid
- bind again with returned object name and password
The protocol for the java client, please refer to the sample code in main().
- Version:
- $Id: LdapConnectionHandler.java,v 1.1 2006/10/09 00:23:16 jjanke Exp $
- Author:
- Jorg Janke
| Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, yield |
LdapConnectionHandler
public LdapConnectionHandler(Socket socket,
MLdapProcessor model)
- Ldap Connection Handler
- Parameters:
socket - server socketmodel - model
run
public void run()
- Do Work
- Specified by:
run in interface Runnable- Overrides:
run in class Thread
toString
public String toString()
- String Representation
- Overrides:
toString in class Thread
- Returns:
- info
main
public static void main(String[] args)
- Test using the java client.
Ldap v3 won't need to do any bind, search, bind anymore.
When new InitialLdapContext() is called, it will bind with the
dn and password, the ldap server should be authenticate with it.
- Parameters:
args -
Compiere® is a registered trademark of ComPiere, Inc. ©2004-2008 HumanFlash.com All rights reserved.