Search in sources :

Example 1 with SCRAMSHA512BindRequest

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");
}
Also used : SCRAMSHA512BindRequest(com.unboundid.ldap.sdk.SCRAMSHA512BindRequest) ANONYMOUSBindRequest(com.unboundid.ldap.sdk.ANONYMOUSBindRequest) GSSAPIBindRequest(com.unboundid.ldap.sdk.GSSAPIBindRequest) UnboundIDCertificatePlusPasswordBindRequest(com.unboundid.ldap.sdk.unboundidds.UnboundIDCertificatePlusPasswordBindRequest) BindRequest(com.unboundid.ldap.sdk.BindRequest) SCRAMSHA512BindRequest(com.unboundid.ldap.sdk.SCRAMSHA512BindRequest) SingleUseTOTPBindRequest(com.unboundid.ldap.sdk.unboundidds.SingleUseTOTPBindRequest) PLAINBindRequest(com.unboundid.ldap.sdk.PLAINBindRequest) UnboundIDYubiKeyOTPBindRequest(com.unboundid.ldap.sdk.unboundidds.UnboundIDYubiKeyOTPBindRequest) EXTERNALBindRequest(com.unboundid.ldap.sdk.EXTERNALBindRequest) DIGESTMD5BindRequest(com.unboundid.ldap.sdk.DIGESTMD5BindRequest) UnboundIDDeliveredOTPBindRequest(com.unboundid.ldap.sdk.unboundidds.UnboundIDDeliveredOTPBindRequest) OAUTHBEARERBindRequest(com.unboundid.ldap.sdk.OAUTHBEARERBindRequest) UnboundIDTOTPBindRequest(com.unboundid.ldap.sdk.unboundidds.UnboundIDTOTPBindRequest) SCRAMSHA1BindRequest(com.unboundid.ldap.sdk.SCRAMSHA1BindRequest) SCRAMSHA256BindRequest(com.unboundid.ldap.sdk.SCRAMSHA256BindRequest) CRAMMD5BindRequest(com.unboundid.ldap.sdk.CRAMMD5BindRequest) Test(org.testng.annotations.Test)

Aggregations

ANONYMOUSBindRequest (com.unboundid.ldap.sdk.ANONYMOUSBindRequest)1 BindRequest (com.unboundid.ldap.sdk.BindRequest)1 CRAMMD5BindRequest (com.unboundid.ldap.sdk.CRAMMD5BindRequest)1 DIGESTMD5BindRequest (com.unboundid.ldap.sdk.DIGESTMD5BindRequest)1 EXTERNALBindRequest (com.unboundid.ldap.sdk.EXTERNALBindRequest)1 GSSAPIBindRequest (com.unboundid.ldap.sdk.GSSAPIBindRequest)1 OAUTHBEARERBindRequest (com.unboundid.ldap.sdk.OAUTHBEARERBindRequest)1 PLAINBindRequest (com.unboundid.ldap.sdk.PLAINBindRequest)1 SCRAMSHA1BindRequest (com.unboundid.ldap.sdk.SCRAMSHA1BindRequest)1 SCRAMSHA256BindRequest (com.unboundid.ldap.sdk.SCRAMSHA256BindRequest)1 SCRAMSHA512BindRequest (com.unboundid.ldap.sdk.SCRAMSHA512BindRequest)1 SingleUseTOTPBindRequest (com.unboundid.ldap.sdk.unboundidds.SingleUseTOTPBindRequest)1 UnboundIDCertificatePlusPasswordBindRequest (com.unboundid.ldap.sdk.unboundidds.UnboundIDCertificatePlusPasswordBindRequest)1 UnboundIDDeliveredOTPBindRequest (com.unboundid.ldap.sdk.unboundidds.UnboundIDDeliveredOTPBindRequest)1 UnboundIDTOTPBindRequest (com.unboundid.ldap.sdk.unboundidds.UnboundIDTOTPBindRequest)1 UnboundIDYubiKeyOTPBindRequest (com.unboundid.ldap.sdk.unboundidds.UnboundIDYubiKeyOTPBindRequest)1 Test (org.testng.annotations.Test)1