* has been initialized for the client.
*/
ldapSession.putSaslProperty( SaslConstants.SASL_CREDS, tokenBytes );
}
LdapPrincipal ldapPrincipal = ( LdapPrincipal ) ldapSession
.getSaslProperty( SaslConstants.SASL_AUTHENT_USER );
if ( ldapPrincipal != null )
{
DirectoryService ds = ldapSession.getLdapServer().getDirectoryService();
String saslMechanism = bindRequest.getSaslMechanism();
CoreSession userSession = ds.getSession( ldapPrincipal.getClonedName(), ldapPrincipal
.getUserPassword(), saslMechanism, null );
// Set the user session into the ldap session
ldapSession.setCoreSession( userSession );
}