bindResponse = ldapConnection.bind( bindRequest );
}
// CRAM-MD5 Authentication
else if ( connection.getConnectionParameter().getAuthMethod() == ConnectionParameter.AuthenticationMethod.SASL_CRAM_MD5 )
{
SaslCramMd5Request cramMd5Request = new SaslCramMd5Request();
cramMd5Request.setUsername( bindPrincipal );
cramMd5Request.setCredentials( bindPassword );
cramMd5Request
.setQualityOfProtection( connection.getConnectionParameter().getSaslQop() );
cramMd5Request.setSecurityStrength( connection.getConnectionParameter()
.getSaslSecurityStrength() );
cramMd5Request.setMutualAuthentication( connection.getConnectionParameter()
.isSaslMutualAuthentication() );
bindResponse = ldapConnection.bind( cramMd5Request );
}
// DIGEST-MD5 Authentication