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");
}
Aggregations