Author: agektmr
Date: Sat Sep 19 04:16:07 2009
New Revision: 816852

URL: http://svn.apache.org/viewvc?rev=816852&view=rev
Log:
Tweak to enable OAuth Proxy

Modified:
    incubator/shindig/trunk/php/src/gadgets/MakeRequest.php
    incubator/shindig/trunk/php/src/gadgets/MakeRequestHandler.php
    incubator/shindig/trunk/php/src/gadgets/MakeRequestOptions.php

Modified: incubator/shindig/trunk/php/src/gadgets/MakeRequest.php
URL: 
http://svn.apache.org/viewvc/incubator/shindig/trunk/php/src/gadgets/MakeRequest.php?rev=816852&r1=816851&r2=816852&view=diff
==============================================================================
--- incubator/shindig/trunk/php/src/gadgets/MakeRequest.php (original)
+++ incubator/shindig/trunk/php/src/gadgets/MakeRequest.php Sat Sep 19 04:16:07 
2009
@@ -77,7 +77,7 @@
   public function fetch(GadgetContext $context, MakeRequestOptions $params) {
 
     $signingFetcherFactory = $gadgetSigner = null;
-    if ($params->getAuthz() == "SIGNED") {
+    if ($params->getAuthz() == "SIGNED" || $params->getAuthz() == "OAUTH") {
       $gadgetSigner = Config::get('security_token_signer');
       $gadgetSigner = new $gadgetSigner();
       $signingFetcherFactory = new 
SigningFetcherFactory(Config::get("private_key_file"));

Modified: incubator/shindig/trunk/php/src/gadgets/MakeRequestHandler.php
URL: 
http://svn.apache.org/viewvc/incubator/shindig/trunk/php/src/gadgets/MakeRequestHandler.php?rev=816852&r1=816851&r2=816852&view=diff
==============================================================================
--- incubator/shindig/trunk/php/src/gadgets/MakeRequestHandler.php (original)
+++ incubator/shindig/trunk/php/src/gadgets/MakeRequestHandler.php Sat Sep 19 
04:16:07 2009
@@ -52,7 +52,7 @@
       'headers' => $result->getResponseHeaders()
     );
     
-    array_merge($responseArray, $result->getMetadatas());
+    $responseArray = array_merge($responseArray, $result->getMetadatas());
 
     $json = array($params->getHref() => $responseArray);
     $json = json_encode($json);

Modified: incubator/shindig/trunk/php/src/gadgets/MakeRequestOptions.php
URL: 
http://svn.apache.org/viewvc/incubator/shindig/trunk/php/src/gadgets/MakeRequestOptions.php?rev=816852&r1=816851&r2=816852&view=diff
==============================================================================
--- incubator/shindig/trunk/php/src/gadgets/MakeRequestOptions.php (original)
+++ incubator/shindig/trunk/php/src/gadgets/MakeRequestOptions.php Sat Sep 19 
04:16:07 2009
@@ -562,12 +562,12 @@
    */
   public function getOAuthRequestParameters() {
     return new OAuthRequestParams(array(
-        OAuthRequestParams::SERVICE_PARAM => $this->getOAuthServiceName(),
-        OAuthRequestParams::TOKEN_PARAM => $this->getOAuthTokenName(),
-        OAuthRequestParams::REQUEST_TOKEN_PARAM => 
$this->getOAuthRequestToken(),
-        OAuthRequestParams::REQUEST_TOKEN_SECRET_PARAM => 
$this->getOAuthRequestTokenSecret(),
-        OAuthRequestParams::BYPASS_SPEC_CACHE_PARAM => $this->getNoCache(),
-        OAuthRequestParams::CLIENT_STATE_PARAM => $this->getOAuthClientState()
+        OAuthRequestParams::$SERVICE_PARAM => $this->getOAuthServiceName(),
+        OAuthRequestParams::$TOKEN_PARAM => $this->getOAuthTokenName(),
+        OAuthRequestParams::$REQUEST_TOKEN_PARAM => 
$this->getOAuthRequestToken(),
+        OAuthRequestParams::$REQUEST_TOKEN_SECRET_PARAM => 
$this->getOAuthRequestTokenSecret(),
+        OAuthRequestParams::$BYPASS_SPEC_CACHE_PARAM => $this->getNoCache(),
+        OAuthRequestParams::$CLIENT_STATE_PARAM => $this->getOAuthClientState()
     ));
   }
 
@@ -694,4 +694,4 @@
   public function getSecurityTokenString() {
     return isset($this->st) ? $this->st : false;
   }
-}
\ No newline at end of file
+}


Reply via email to