com.bankframe.services.authentication.ldap
Class LDAPAuthenticationBean
java.lang.Object
com.bankframe.ejb.ESessionBean
com.bankframe.services.authentication.AuthenticationBean
com.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:
- 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
- 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:
- Search for the specified userId in the bankframeusers LDAP context
- If the userId is found, then the fully qualified distinguished name for that userId is calculated
- If the userId is not found then an AuthenticationException is thrown
- An attempt is made to bind to the LDAP server using the userId's full dn and the supplied password
- If the connection is established then authentication has succeeded, the connection is not needed so it is closed
- 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
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 |
LDAPAuthenticationBean
public LDAPAuthenticationBean()
- Constructor.
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.