shindig-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ssiev...@apache.org
Subject svn commit: r1351473 - /shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/oauth2/BasicOAuth2Request.java
Date Mon, 18 Jun 2012 20:09:51 GMT
Author: ssievers
Date: Mon Jun 18 20:09:51 2012
New Revision: 1351473

URL: http://svn.apache.org/viewvc?rev=1351473&view=rev
Log:
SHINDIG-1786 | Utilizing an OAuth2 refresh token to obtain an access token should handle a
400 response | Patch from Adam Clarke.  Thanks!

Modified:
    shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/oauth2/BasicOAuth2Request.java

Modified: shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/oauth2/BasicOAuth2Request.java
URL: http://svn.apache.org/viewvc/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/oauth2/BasicOAuth2Request.java?rev=1351473&r1=1351472&r2=1351473&view=diff
==============================================================================
--- shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/oauth2/BasicOAuth2Request.java
(original)
+++ shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/oauth2/BasicOAuth2Request.java
Mon Jun 18 20:09:51 2012
@@ -828,7 +828,7 @@ public class BasicOAuth2Request implemen
         if (ret == null) {
           // response is not null..
           final int statusCode = response.getHttpStatusCode();
-          if (statusCode == HttpResponse.SC_UNAUTHORIZED) {
+          if ((statusCode == HttpResponse.SC_UNAUTHORIZED) || (statusCode == HttpResponse.SC_BAD_REQUEST))
{
             try {
               this.store.removeToken(accessor.getRefreshToken());
             } catch (final GadgetException e) {



Mime
View raw message