use of com.unboundid.ldap.sdk.SCRAMSHA512BindRequest in project ldapsdk by pingidentity.
the class SASLUtilsTestCase method testValidSCRAMSHA512Bind.
/**
* Tests the ability to create a valid SCRAM-SHA-512 bind request.
*
* @throws Exception If an unexpected problem occurs.
*/
@Test()
public void testValidSCRAMSHA512Bind() throws Exception {
final BindRequest bindRequest = SASLUtils.createBindRequest(null, "password", null, "mech=SCRAM-SHA-512", "username=jdoe");
assertNotNull(bindRequest);
assertTrue(bindRequest instanceof SCRAMSHA512BindRequest);
final SCRAMSHA512BindRequest scramBind = (SCRAMSHA512BindRequest) bindRequest;
assertNotNull(scramBind.getUsername());
assertEquals(scramBind.getUsername(), "jdoe");
assertNotNull(scramBind.getPasswordString());
assertEquals(scramBind.getPasswordString(), "password");
}
Aggregations