Search in sources :

Example 1 with SCRAMSHA1BindRequest

use of com.unboundid.ldap.sdk.SCRAMSHA1BindRequest in project ldapsdk by pingidentity.

the class SASLUtilsTestCase method testValidSCRAMSHA1Bind.

/**
 * Tests the ability to create a valid SCRAM-SHA-1 bind request.
 *
 * @throws  Exception  If an unexpected problem occurs.
 */
@Test()
public void testValidSCRAMSHA1Bind() throws Exception {
    final BindRequest bindRequest = SASLUtils.createBindRequest(null, "password", null, "mech=SCRAM-SHA-1", "username=jdoe");
    assertNotNull(bindRequest);
    assertTrue(bindRequest instanceof SCRAMSHA1BindRequest);
    final SCRAMSHA1BindRequest scramBind = (SCRAMSHA1BindRequest) bindRequest;
    assertNotNull(scramBind.getUsername());
    assertEquals(scramBind.getUsername(), "jdoe");
    assertNotNull(scramBind.getPasswordString());
    assertEquals(scramBind.getPasswordString(), "password");
}
Also used : SCRAMSHA1BindRequest(com.unboundid.ldap.sdk.SCRAMSHA1BindRequest) 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