@Override public void injectDataFromJson(String p_json) { if (StringUtils.isNotBlank(entity)) { try { JSONObject jsonObj = new JSONObject(entity); if (jsonObj.has("access_token")) { setAccessToken(jsonObj.getString("access_token")); } if (jsonObj.has("token_type")) { setTokenType(TokenType.fromString(jsonObj.getString("token_type"))); } if (jsonObj.has("expires_in")) { setExpiresIn(jsonObj.getInt("expires_in")); } if (jsonObj.has("refresh_token")) { setRefreshToken(jsonObj.getString("refresh_token")); } if (jsonObj.has("scope")) { setScope(jsonObj.getString("scope")); } if (jsonObj.has("id_token")) { setIdToken(jsonObj.getString("id_token")); } } catch (JSONException e) { LOG.error(e.getMessage(), e); } } }