You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by ch...@apache.org on 2008/11/07 15:37:16 UTC
svn commit: r712138 -
/incubator/shindig/trunk/php/src/common/sample/BasicOAuthDataStore.php
Author: chabotc
Date: Fri Nov 7 06:37:10 2008
New Revision: 712138
URL: http://svn.apache.org/viewvc?rev=712138&view=rev
Log:
Minor code cleanup
Modified:
incubator/shindig/trunk/php/src/common/sample/BasicOAuthDataStore.php
Modified: incubator/shindig/trunk/php/src/common/sample/BasicOAuthDataStore.php
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/php/src/common/sample/BasicOAuthDataStore.php?rev=712138&r1=712137&r2=712138&view=diff
==============================================================================
--- incubator/shindig/trunk/php/src/common/sample/BasicOAuthDataStore.php (original)
+++ incubator/shindig/trunk/php/src/common/sample/BasicOAuthDataStore.php Fri Nov 7 06:37:10 2008
@@ -23,10 +23,6 @@
*/
class BasicOAuthDataStore extends OAuthDataStore {
- function __construct()
- {
- }
-
function lookup_consumer($consumer_key)
{
return new OAuthConsumer($consumer_key, "fake-consumer-secret");
@@ -36,14 +32,11 @@
{
if ($token_type == "request") {
return new OAuthToken($token, "fake-request-secret");
+ } elseif ($token_type == "access") {
+ return new OAuthToken($token, "fake-access-secret");
} else {
- if ($token_type == "access") {
- return new OAuthToken($token, "fake-access-secret");
- } else {
- throw new OAuthException("unexpected token type: $token_type");
- }
+ throw new OAuthException("unexpected token type: $token_type");
}
- return null;
}
function lookup_nonce($consumer, $token, $nonce, $timestamp)
@@ -63,6 +56,6 @@
function authorize_request_token($token)
{
- // mark the given requst token as having been authorized by the user
+ // mark the given request token as having been authorized by the user
}
}