Search in sources :

Example 1 with OAUTHBEARERBindRequest

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

the class SASLUtilsTestCase method testValidOAUTHBEARERBind.

/**
 * Tests the ability to create a valid OAUTHBEARER bind request.
 *
 * @throws  Exception  If an unexpected problem occurs.
 */
@Test()
public void testValidOAUTHBEARERBind() throws Exception {
    final BindRequest bindRequest = SASLUtils.createBindRequest(null, (String) null, null, "mech=OAUTHBEARER", "accessToken=abcdefg");
    assertNotNull(bindRequest);
    assertTrue(bindRequest instanceof OAUTHBEARERBindRequest);
    final OAUTHBEARERBindRequest oAuthBearerBind = (OAUTHBEARERBindRequest) bindRequest;
    assertNotNull(oAuthBearerBind.getAccessToken());
    assertEquals(oAuthBearerBind.getAccessToken(), "abcdefg");
}
Also used : 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) OAUTHBEARERBindRequest(com.unboundid.ldap.sdk.OAUTHBEARERBindRequest) 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