+ }
+ catch (NullPointerException e)
+ {
+ log.warn("expected additional data is missing: {}", data);
+ }
+
+ DefaultOAuth2AccessToken token = null;
+ try
+ {
+ String value = json.get("oauth_token").asText();
+ if (value.isEmpty())
+ {
+ log.error("field \"oauth_token\" is missing: {}", data);
+ throw redirect;
+ }
+ token = new DefaultOAuth2AccessToken(value);
+ token.setExpiration(new Date(json.get("expires").getLongValue()*1000L));
+
+ additionalInformation.put(
+ "user_id",
+ json.get("user_id").asText()
+ );
+