String url = Utils.formatMessage(TOKEN_URL, authCode,
request.getRequestURL().toString(), Config.LINKEDIN_APP_ID, Config.LINKEDIN_SECRET);
CloseableHttpClient httpclient = HttpClients.createDefault();
HttpPost tokenPost = new HttpPost(url);
CloseableHttpResponse resp1 = httpclient.execute(tokenPost);
ObjectReader jreader = Utils.getJsonReader(Map.class);
if (resp1 != null && resp1.getEntity() != null) {
Map<String, Object> token = jreader.readValue(resp1.getEntity().getContent());
if (token != null && token.containsKey("access_token")) {