Skip to content

Commit

Permalink
added additional logging
Browse files Browse the repository at this point in the history
  • Loading branch information
nathandunn committed Nov 29, 2016
1 parent 859b9a7 commit 7557368
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 84,9 @@ protected void doGet(HttpServletRequest req, HttpServletResponse resp)
while ((line = rd.readLine()) != null) {
result.append(line);
}
System.out.println("GHAuthenticationAccessServlet result string: " result.toString());
GHUserResponse ghUserResponse = gson.fromJson(result.toString(), GHUserResponse.class);

System.out.println("GHAuthenticationAccessServlet json response: " gson.toJson(ghUserResponse));
boolean isAuthenticated = ghUserResponse.email!=null;

if(isAuthenticated){
Expand Down Expand Up @@ -129,10 130,10 @@ private String getAccessToken(String code) throws IOException{
result.append(line);
}

System.out.println("result string: " result.toString());
System.out.println("getAccessToken result string: " result.toString());

GHAccessResponse ghAccessResponse = gson.fromJson(result.toString(), GHAccessResponse.class);
System.out.println("json response: " gson.toJson(ghAccessResponse));
System.out.println("getAccessToken json response: " gson.toJson(ghAccessResponse));

String accessToken = ghAccessResponse.access_token;
return accessToken ;
Expand Down

0 comments on commit 7557368

Please sign in to comment.