Adempiere 3.5.2a

org.compiere.ldap
Class LdapConnectionHandler

java.lang.Object
  extended by java.lang.Thread
      extended by 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

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
LdapConnectionHandler(Socket socket, MLdapProcessor model)
          Ldap Connection Handler
 
Method Summary
static void main(String[] args)
          Test using the java client.
 void run()
          Do Work
 String toString()
          String Representation
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LdapConnectionHandler

public LdapConnectionHandler(Socket socket,
                             MLdapProcessor model)
Ldap Connection Handler

Parameters:
socket - server socket
model - model
Method Detail

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 -

Adempiere 3.5.2a

Adempiere® is a registered trademark of ADempiere Business Inc. ©2004-2008 HumanFlash.com All rights reserved.