Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
OAuth GitHub and Play!
* Github call this as callback
public static void callback(String code) {
System.out.println("Just get code from github : " + code);
WSRequest request = WS
request.setParameter("client_id", CLIENT_ID);
request.setParameter("client_secret", CLIENT_SCRET);
request.setParameter("code", code);
System.out.println("Trying to get oauth from github...");
play.libs.WS.HttpResponse response =;
System.out.println("Response status = " + response.getStatus());
System.out.println("Response body = " + response.getString());
String oauth = "quickhubapp://oauth?" + response.getString();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment