private UserInfoResponse getUserInfo(final String accessToken) { logger.debug("Session validation successful. Getting user information"); final UserInfoClient userInfoClient = new UserInfoClient(this.openIdConfiguration.getUserInfoEndpoint()); final UserInfoResponse userInfoResponse = userInfoClient.execUserInfo(accessToken); logger.trace("userInfoResponse.getStatus(): '{}'", userInfoResponse.getStatus()); logger.trace("userInfoResponse.getErrorType(): '{}'", userInfoResponse.getErrorType()); logger.debug("userInfoResponse.getClaims(): '{}'", userInfoResponse.getClaims()); return userInfoResponse; }
@Test public void requestUserInfoInvalidRequest() throws Exception { showTitle("requestUserInfoInvalidRequest"); UserInfoClient userInfoClient = new UserInfoClient(userInfoEndpoint); UserInfoResponse response = userInfoClient.execUserInfo(null); showClient(userInfoClient); assertEquals(response.getStatus(), 400, "Unexpected response code: " + response.getStatus()); assertNotNull(response.getErrorType(), "Unexpected result: errorType not found"); assertNotNull(response.getErrorDescription(), "Unexpected result: errorDescription not found"); }
@Test public void requestUserInfoInvalidToken() throws Exception { showTitle("requestUserInfoInvalidToken"); UserInfoClient userInfoClient = new UserInfoClient(userInfoEndpoint); UserInfoResponse response = userInfoClient.execUserInfo("INVALID_ACCESS_TOKEN"); showClient(userInfoClient); assertEquals(response.getStatus(), 400, "Unexpected response code: " + response.getStatus()); assertNotNull(response.getErrorType(), "Unexpected result: errorType not found"); assertNotNull(response.getErrorDescription(), "Unexpected result: errorDescription not found"); }
private UserInfoResponse requestUserInfo(String accessToken) throws Exception { UserInfoClient userInfoClient = new UserInfoClient(userInfoEndpoint); userInfoClient.setExecutor(clientExecutor(true)); UserInfoResponse response2 = userInfoClient.execUserInfo(accessToken); assertNotNull(response2.getClaim(JwtClaimName.EMAIL)); return response2; }
UserInfoResponse response2 = userInfoClient.execUserInfo(accessToken);
UserInfoResponse userInfoResponse = userInfoClient.execUserInfo(accessToken);
UserInfoResponse response2 = userInfoClient.execUserInfo(accessToken);
UserInfoResponse response2 = userInfoClient.execUserInfo(accessToken);
UserInfoResponse response2 = userInfoClient.execUserInfo(accessToken);
UserInfoResponse response2 = userInfoClient.execUserInfo(accessToken);
UserInfoResponse response2 = userInfoClient.execUserInfo(accessToken);
UserInfoResponse response2 = userInfoClient.execUserInfo(accessToken);
UserInfoResponse userInfoResponse = userInfoClient.execUserInfo(accessToken);
UserInfoResponse userInfoResponse = userInfoClient.execUserInfo(accessToken);
UserInfoResponse userInfoResponse = userInfoClient.execUserInfo(accessToken);
UserInfoResponse userInfoResponse = userInfoClient.execUserInfo(accessToken);
UserInfoResponse userInfoResponse = userInfoClient.execUserInfo(accessToken);
UserInfoResponse userInfoResponse = userInfoClient.execUserInfo(accessToken);
UserInfoResponse userInfoResponse = userInfoClient.execUserInfo(accessToken);
UserInfoResponse userInfoResponse = userInfoClient.execUserInfo(accessToken);