org.apache.directory.server.ldap.handlers
Class BindHandler

java.lang.Object
  extended by org.apache.directory.server.ldap.handlers.LdapRequestHandler<org.apache.directory.shared.ldap.message.internal.InternalBindRequest>
      extended by org.apache.directory.server.ldap.handlers.BindHandler
All Implemented Interfaces:
org.apache.mina.handler.demux.MessageHandler<org.apache.directory.shared.ldap.message.internal.InternalBindRequest>

public class BindHandler
extends LdapRequestHandler<org.apache.directory.shared.ldap.message.internal.InternalBindRequest>

A single reply handler for InternalBindRequests. Implements server-side of RFC 2222, sections 4.2 and 4.3.

Version:
$Rev: 664302 $, $Date: 2008-06-07 04:44:00 -0400 (Sat, 07 Jun 2008) $
Author:
Apache Directory Project

Field Summary
 
Fields inherited from class org.apache.directory.server.ldap.handlers.LdapRequestHandler
ldapServer
 
Fields inherited from interface org.apache.mina.handler.demux.MessageHandler
NOOP
 
Constructor Summary
BindHandler()
           
 
Method Summary
 void handle(LdapSession ldapSession, org.apache.directory.shared.ldap.message.internal.InternalBindRequest bindRequest)
          Deal with a received BindRequest
 void handleSaslAuth(LdapSession ldapSession, org.apache.directory.shared.ldap.message.internal.InternalBindRequest bindRequest)
          Handle the SASL authentication.
 void handleSimpleAuth(LdapSession ldapSession, org.apache.directory.shared.ldap.message.internal.InternalBindRequest bindRequest)
          Handle the Simple authentication.
 void setSaslMechanismHandlers(java.util.Map<java.lang.String,MechanismHandler> handlers)
          Set the mechanisms handler map.
 
Methods inherited from class org.apache.directory.server.ldap.handlers.LdapRequestHandler
getLdapServer, handleException, handleMessage, isConfidentialityRequirementSatisfied, rejectWithoutConfidentiality, setLdapServer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BindHandler

public BindHandler()
Method Detail

setSaslMechanismHandlers

public void setSaslMechanismHandlers(java.util.Map<java.lang.String,MechanismHandler> handlers)
Set the mechanisms handler map.

Parameters:
handlers - The associations btween a machanism and its handler

handleSimpleAuth

public void handleSimpleAuth(LdapSession ldapSession,
                             org.apache.directory.shared.ldap.message.internal.InternalBindRequest bindRequest)
                      throws java.lang.Exception
Handle the Simple authentication.

Parameters:
session - The associated Session
message - The BindRequest received
Throws:
java.lang.Exception - If the authentication cannot be done

handleSaslAuth

public void handleSaslAuth(LdapSession ldapSession,
                           org.apache.directory.shared.ldap.message.internal.InternalBindRequest bindRequest)
                    throws java.lang.Exception
Handle the SASL authentication. If the mechanism is known, we are facing three cases :

handle

public void handle(LdapSession ldapSession,
                   org.apache.directory.shared.ldap.message.internal.InternalBindRequest bindRequest)
            throws java.lang.Exception
Deal with a received BindRequest

Specified by:
handle in class LdapRequestHandler<org.apache.directory.shared.ldap.message.internal.InternalBindRequest>
Parameters:
session - The current session
bindRequest - The received BindRequest
Throws:
java.lang.Exception - If the authentication cannot be handled


Copyright © 2003-2011 Apache Software Foundation. All Rights Reserved.