com.bankframe.services.authentication.ldap
Class LDAPAuthenticationBean

java.lang.Object
  extended bycom.bankframe.ejb.ESessionBean
      extended bycom.bankframe.services.authentication.AuthenticationBean
          extended bycom.bankframe.services.authentication.ldap.LDAPAuthenticationBean
All Implemented Interfaces:
javax.ejb.EnterpriseBean, ESession, java.io.Serializable, javax.ejb.SessionBean

public class LDAPAuthenticationBean
extends AuthenticationBean

This class authenticates a user against an LDAP repository.

It expects the following fields in the incoming DataPacket:

  1. LDAPAuthentication.USER_ID - The userId of the user to authenticate. This does not need to be a fully qualified distinguished name, since a search will be carried out in the ldap context for a matching userId
  2. LDAPAuthentication.PASSWORD - The password of the user to authenticate. The datatype of this field will depend on the encryption method used to communicate with the LDAP server. If it is not the correct type an attempt will be made to convert it to the correct type

This class carries out the following steps to authenticate the user:
  1. Search for the specified userId in the bankframeusers LDAP context
  2. If the userId is found, then the fully qualified distinguished name for that userId is calculated
  3. If the userId is not found then an AuthenticationException is thrown
  4. An attempt is made to bind to the LDAP server using the userId's full dn and the supplied password
  5. If the connection is established then authentication has succeeded, the connection is not needed so it is closed
  6. Otherwise the LDAP refused to create the connection because the user credentials were not correct. An AuthenticationException is thrown

The processLogoff() method will always succeed. Since a connection is not kept to the LDAP server nothing needs to be done when a user logs off.

Author:
ETU
See Also:
Serialized Form

Constructor Summary
LDAPAuthenticationBean()
          Constructor.
 
Method Summary
 java.util.Vector processLogoff(DataPacket data)
          This method processes a logoff request.
 java.util.Vector processLogon(DataPacket data)
          This method gpocesses a Logon for a user.
 
Methods inherited from class com.bankframe.services.authentication.AuthenticationBean
processDataPacket
 
Methods inherited from class com.bankframe.ejb.ESessionBean
audit, ejbActivate, ejbCreate, ejbLoad, ejbPassivate, ejbPostCreate, ejbRemove, ejbStore, getSessionContext, processDataPackets, setSessionContext, unsetSessionContext
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LDAPAuthenticationBean

public LDAPAuthenticationBean()
Constructor.

Method Detail

processLogoff

public java.util.Vector processLogoff(DataPacket data)
                               throws ProcessingErrorException
This method processes a logoff request.

Specified by:
processLogoff in class AuthenticationBean
Parameters:
data - the logoff request to process
Returns:
a vector of DataPackets
Throws:
ProcessingErrorException - if the logoff request cannot be processed

processLogon

public java.util.Vector processLogon(DataPacket data)
                              throws AuthenticationException
This method gpocesses a Logon for a user. A logon requires a DataPacket containing the userId and password.

Specified by:
processLogon in class AuthenticationBean
Parameters:
data - Datapacket containg userId and password
Returns:
a vector of DataPackets, each one containing logon response.
Throws:
AuthenticationException


Copyright © 2004 Siebel Systems, Inc. All rights reserved.