use of com.okta.oidc.net.request.TokenRequest in project okta-oidc-android by okta.
the class OktaIdTokenTest method validateIssuedAtTimeoutWithEmptyValidator.
@Test
public void validateIssuedAtTimeoutWithEmptyValidator() throws AuthorizationException {
String jws = TestValues.getJwtIssuedAtTimeout(CUSTOM_URL, CUSTOM_NONCE, mConfig.getClientId());
OktaIdToken idToken = OktaIdToken.parseIdToken(jws);
String verifier = CodeVerifierUtil.generateRandomCodeVerifier();
TokenRequest tokenRequest = TestValues.getTokenRequest(mConfig, getAuthorizeRequest(mConfig, verifier), getAuthorizeResponse("state", "code"), mConfiguration);
OktaIdToken.Validator validator = mock(OktaIdToken.Validator.class);
idToken.validate(tokenRequest, validator);
verify(validator).validate(idToken);
}
Aggregations