private AccessToken execute(HttpRequest request) throws IOException {
HttpResponse response = HttpRequests.execute(request, getHttpRequestConfig());
LOG.debug("Got response {} - {} from {}", response.getResponseCode(), response.getResponseMessage(), baseURI);
if (response.getResponseCode() != HttpURLConnection.HTTP_OK) {
throw new HttpFailureException(response.getResponseMessage(), response.getResponseCode());
}
Map<String, String> responseMap =
ObjectResponse.fromJsonBody(response, new TypeToken<Map<String, String>>() { }).getResponseObject();
String tokenValue = responseMap.get(ACCESS_TOKEN_KEY);