bindResponse = ldapConnection.bind( cramMd5Request );
}
// DIGEST-MD5 Authentication
else if ( connection.getConnectionParameter().getAuthMethod() == ConnectionParameter.AuthenticationMethod.SASL_DIGEST_MD5 )
{
SaslDigestMd5Request digestMd5Request = new SaslDigestMd5Request();
digestMd5Request.setUsername( bindPrincipal );
digestMd5Request.setCredentials( bindPassword );
digestMd5Request.setRealmName( connection.getConnectionParameter().getSaslRealm() );
digestMd5Request.setQualityOfProtection( connection.getConnectionParameter()
.getSaslQop() );
digestMd5Request.setSecurityStrength( connection.getConnectionParameter()
.getSaslSecurityStrength() );
digestMd5Request.setMutualAuthentication( connection.getConnectionParameter()
.isSaslMutualAuthentication() );
bindResponse = ldapConnection.bind( digestMd5Request );
}
// GSSAPI Authentication