oltu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r1732996 - /oltu/trunk/oauth-2.0/client/src/main/java/org/apache/oltu/oauth2/client/response/GitHubTokenResponse.java
Date Tue, 01 Mar 2016 05:45:45 GMT
Author: stein
Date: Tue Mar  1 05:45:45 2016
New Revision: 1732996

URL: http://svn.apache.org/viewvc?rev=1732996&view=rev
Log:
OLTU-173 Fix GithubTokenRespons. Thanks Gualtiero Testa for the patch!

Modified:
    oltu/trunk/oauth-2.0/client/src/main/java/org/apache/oltu/oauth2/client/response/GitHubTokenResponse.java

Modified: oltu/trunk/oauth-2.0/client/src/main/java/org/apache/oltu/oauth2/client/response/GitHubTokenResponse.java
URL: http://svn.apache.org/viewvc/oltu/trunk/oauth-2.0/client/src/main/java/org/apache/oltu/oauth2/client/response/GitHubTokenResponse.java?rev=1732996&r1=1732995&r2=1732996&view=diff
==============================================================================
--- oltu/trunk/oauth-2.0/client/src/main/java/org/apache/oltu/oauth2/client/response/GitHubTokenResponse.java
(original)
+++ oltu/trunk/oauth-2.0/client/src/main/java/org/apache/oltu/oauth2/client/response/GitHubTokenResponse.java
Tue Mar  1 05:45:45 2016
@@ -27,47 +27,53 @@ import org.apache.oltu.oauth2.common.tok
 import org.apache.oltu.oauth2.common.utils.OAuthUtils;
 
 /**
- *
- *
- *
+ * Custom response class
  */
 public class GitHubTokenResponse extends OAuthAccessTokenResponse {
 
+    @Override
     public String getAccessToken() {
         return getParam(OAuth.OAUTH_ACCESS_TOKEN);
     }
 
     @Override
     public String getTokenType() {
-    	return getParam(OAuth.OAUTH_TOKEN_TYPE);
+        return getParam(OAuth.OAUTH_TOKEN_TYPE);
     }
 
+    @Override
     public Long getExpiresIn() {
         String value = getParam(OAuth.OAUTH_EXPIRES_IN);
         return value == null? null: Long.valueOf(value);
     }
 
+    @Override
     public String getRefreshToken() {
-        return getParam(OAuth.OAUTH_EXPIRES_IN);
+        return getParam(OAuth.OAUTH_REFRESH_TOKEN);
     }
 
+    @Override
     public String getScope() {
         return getParam(OAuth.OAUTH_SCOPE);
     }
 
+    @Override
     public OAuthToken getOAuthToken() {
         return new BasicOAuthToken(getAccessToken(), getTokenType(), getExpiresIn(), getRefreshToken(),
getScope());
     }
 
+    @Override
     protected void setBody(String body) {
         this.body = body;
         parameters = OAuthUtils.decodeForm(body);
     }
 
+    @Override
     protected void setContentType(String contentType) {
         this.contentType = contentType;
     }
 
+    @Override
     protected void setResponseCode(int code) {
         this.responseCode = code;
     }



Mime
View raw message