26 ClientInterface client = Tester.newClient(host);
27 RegisterSiteResponse site = RegisterSiteTest.registerSite(client, opHost, redirectUrl);
29 final AuthorizationCodeFlowParams params =
new AuthorizationCodeFlowParams();
30 params.setOxdId(site.getOxdId());
31 params.setClientId(clientId);
32 params.setClientSecret(clientSecret);
33 params.setNonce(UUID.randomUUID().toString());
34 params.setRedirectUrl(redirectUrl);
35 params.setScope(
"openid");
36 params.setUserId(userId);
37 params.setUserSecret(userSecret);
39 final AuthorizationCodeFlowResponse resp = client.authorizationCodeFlow(Tester.getAuthorization(), params).dataAsResponse(AuthorizationCodeFlowResponse.class);
42 notEmpty(resp.getAccessToken());
43 notEmpty(resp.getAuthorizationCode());
44 notEmpty(resp.getIdToken());
45 notEmpty(resp.getRefreshToken());
46 notEmpty(resp.getScope());