public Response(WS.HttpResponse response) { this.httpResponse = response; JSONObject queryJson = JSONObject.fromObject(response.getString()); if (queryJson != null) { this.accessToken = queryJson.get("access_token").toString(); this.uid = queryJson.get("uid").toString(); this.error = null; } else { this.accessToken = null; this.uid = null; this.error = Error.oauth2(response); } }