String accessToken;
try {
accessToken = oAuthTokenManager.getAccessToken();
} catch (ServiceException e) {
// must wrap exception because of base class signature
throw new ClientHandlerException(e);
} catch (URISyntaxException e) {
// must wrap exception because of base class signature
throw new ClientHandlerException(e);
}
clientRequest.getHeaders()
.add("Authorization", "Bearer " + accessToken);