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-24 16:36:02 -0800
commita0b84387737b016168eb3b9a1c6dee1980724f66 (patch)
treef34e3da1176942c19833a342b80f614cf2dd61ae /classes/Oauth_application.php
parentc473a39a7da07fbe5b80fec4c08111a554691c3a (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;
+ }
+
}