Skip to content

Commit

Permalink
Fix of yegor256#229
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberone committed May 1, 2015
1 parent 59b7940 commit 43d66a8
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/main/java/org/takes/facets/auth/social/PsGithub.java
Original file line number Diff line number Diff line change
Expand Up @@ -124,14 +124,16 @@ private String token(final String home, final String code)
throws IOException {
// @checkstyle LineLength (1 line)
final String uri = new Href("https://github.com/login/oauth/access_token")
.with("client_id", this.app)
.with("redirect_uri", home)
.with("client_secret", this.key)
.with("code", code)
.toString();
return new JdkRequest(uri)
.method("POST")
.header("Accept", "application/xml")
.body()
.formParam("client_id", this.app)
.formParam("redirect_uri", home)
.formParam("client_secret", this.key)
.formParam("code", code)
.back()
.fetch().as(RestResponse.class)
.assertStatus(HttpURLConnection.HTTP_OK)
.as(XmlResponse.class)
Expand Down

0 comments on commit 43d66a8

Please sign in to comment.