summaryrefslogtreecommitdiff
path: root/classes/Oauth_application.php
diff options
context:
space:
mode:
authorZach Copley <zach@status.net>2010-01-11 01:11:50 -0800
committerZach Copley <zach@status.net>2010-01-14 02:41:06 +0000
commitd8abad747823e4bc9fa4f43efbc0715b146b61eb (patch)
treeb01859f0ff2fa67da88a2bcca280efed14f67441 /classes/Oauth_application.php
parente7f4ab677480f0fa39db5199de5f77821ba4a60d (diff)
Exchanging authorized request tokens for access tokens working
Diffstat (limited to 'classes/Oauth_application.php')
-rw-r--r--classes/Oauth_application.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/classes/Oauth_application.php b/classes/Oauth_application.php
index d4de6d82e..5df8b9459 100644
--- a/classes/Oauth_application.php
+++ b/classes/Oauth_application.php
@@ -88,4 +88,18 @@ class Oauth_application extends Memcached_DataObject
return $this->update($orig);
}
+ static function getByConsumerKey($key)
+ {
+ if (empty($key)) {
+ return null;
+ }
+
+ $app = new Oauth_application();
+ $app->consumer_key = $key;
+ $app->limit(1);
+ $result = $app->find(true);
+
+ return empty($result) ? null : $app;
+ }
+
}