shindig-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l...@apache.org
Subject svn commit: r1239682 - in /shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/oauth2/handler: BasicAuthenticationHandler.java ClientCredentialsGrantTypeHandler.java CodeAuthorizationResponseHandler.java StandardAuthenticationHandler.java
Date Thu, 02 Feb 2012 15:52:05 GMT
Author: lixu
Date: Thu Feb  2 15:52:04 2012
New Revision: 1239682

URL: http://svn.apache.org/viewvc?rev=1239682&view=rev
Log:
SHINDIG-1672 | commit patch for Doug Davies | Flow additional auth params to access token
endpoint

Modified:
    shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/oauth2/handler/BasicAuthenticationHandler.java
    shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/oauth2/handler/ClientCredentialsGrantTypeHandler.java
    shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/oauth2/handler/CodeAuthorizationResponseHandler.java
    shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/oauth2/handler/StandardAuthenticationHandler.java

Modified: shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/oauth2/handler/BasicAuthenticationHandler.java
URL: http://svn.apache.org/viewvc/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/oauth2/handler/BasicAuthenticationHandler.java?rev=1239682&r1=1239681&r2=1239682&view=diff
==============================================================================
--- shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/oauth2/handler/BasicAuthenticationHandler.java
(original)
+++ shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/oauth2/handler/BasicAuthenticationHandler.java
Thu Feb  2 15:52:04 2012
@@ -65,11 +65,6 @@ public class BasicAuthenticationHandler 
       final byte[] authBytes = Base64.encodeBase64(authString.getBytes());
       request.setHeader(OAuth2Message.AUTHORIZATION_HEADER, "Basic: " + new String(authBytes));
 
-      // add any additional parameters
-      for (Map.Entry<String, String> entry : accessor.getAdditionalRequestParams().entrySet())
{
-        request.setParam(entry.getKey(), entry.getValue());
-      }
-
       return null;
     } catch (final Exception e) {
       return BasicAuthenticationHandler.getError("Exception adding basic auth headers", e);

Modified: shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/oauth2/handler/ClientCredentialsGrantTypeHandler.java
URL: http://svn.apache.org/viewvc/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/oauth2/handler/ClientCredentialsGrantTypeHandler.java?rev=1239682&r1=1239681&r2=1239682&view=diff
==============================================================================
--- shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/oauth2/handler/ClientCredentialsGrantTypeHandler.java
(original)
+++ shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/oauth2/handler/ClientCredentialsGrantTypeHandler.java
Thu Feb  2 15:52:04 2012
@@ -158,11 +158,6 @@ public class ClientCredentialsGrantTypeH
         queryParams.put(OAuth2Message.SCOPE, scope);
       }
 
-      // add any additional parameters
-      for (Map.Entry<String, String> entry : accessor.getAdditionalRequestParams().entrySet())
{
-        queryParams.put(entry.getKey(), entry.getValue());
-      }
-
       ret = OAuth2Utils.buildUrl(accessor.getTokenUrl(), queryParams, null);
     } catch (final UnsupportedEncodingException e) {
       throw new OAuth2RequestException(OAuth2Error.CLIENT_CREDENTIALS_PROBLEM,

Modified: shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/oauth2/handler/CodeAuthorizationResponseHandler.java
URL: http://svn.apache.org/viewvc/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/oauth2/handler/CodeAuthorizationResponseHandler.java?rev=1239682&r1=1239681&r2=1239682&view=diff
==============================================================================
--- shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/oauth2/handler/CodeAuthorizationResponseHandler.java
(original)
+++ shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/oauth2/handler/CodeAuthorizationResponseHandler.java
Thu Feb  2 15:52:04 2012
@@ -102,6 +102,11 @@ public class CodeAuthorizationResponseHa
     queryParams.put(OAuth2Message.CLIENT_ID, clientId);
     queryParams.put(OAuth2Message.CLIENT_SECRET, secret);
 
+    // add any additional parameters
+    for (Map.Entry<String, String> entry : accessor.getAdditionalRequestParams().entrySet())
{
+      queryParams.put(entry.getKey(), entry.getValue());
+    }
+
     ret = OAuth2Utils.buildUrl(ret, queryParams, null);
 
     final char firstChar = ret.charAt(0);

Modified: shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/oauth2/handler/StandardAuthenticationHandler.java
URL: http://svn.apache.org/viewvc/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/oauth2/handler/StandardAuthenticationHandler.java?rev=1239682&r1=1239681&r2=1239682&view=diff
==============================================================================
--- shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/oauth2/handler/StandardAuthenticationHandler.java
(original)
+++ shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/oauth2/handler/StandardAuthenticationHandler.java
Thu Feb  2 15:52:04 2012
@@ -69,11 +69,6 @@ public class StandardAuthenticationHandl
       request.setHeader(OAuth2Message.CLIENT_SECRET, secret);
       request.setParam(OAuth2Message.CLIENT_SECRET, secret);
 
-      // add any additional parameters
-      for (Map.Entry<String, String> entry : accessor.getAdditionalRequestParams().entrySet())
{
-        request.setParam(entry.getKey(), entry.getValue());
-      }
-
       return null;
     } catch (final Exception e) {
       return StandardAuthenticationHandler.getError("Exception adding standard auth headers",
e);



Mime
View raw message