summaryrefslogtreecommitdiffstats
path: root/lib/api.php
diff options
context:
space:
mode:
authorMichael Gapczynski <mtgap@owncloud.com>2012-08-02 20:02:31 -0400
committerMichael Gapczynski <mtgap@owncloud.com>2012-08-02 20:02:31 -0400
commite3d88270cc0fcdfc667f0a120040864818b3b2a1 (patch)
treefe08e9cec469262ca559df95d656650aa7a6409a /lib/api.php
parent4b9200f6f7a571c251ef89599e1af9e25e2e75f4 (diff)
downloadnextcloud-server-e3d88270cc0fcdfc667f0a120040864818b3b2a1.tar.gz
nextcloud-server-e3d88270cc0fcdfc667f0a120040864818b3b2a1.zip
OAuth server implementation using oauth library
Diffstat (limited to 'lib/api.php')
-rw-r--r--lib/api.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/api.php b/lib/api.php
index 05d34ffe870..c8bd0aec2fa 100644
--- a/lib/api.php
+++ b/lib/api.php
@@ -25,6 +25,15 @@
*/
class OC_API {
+
+ private static $server;
+
+ /**
+ * initialises the OAuth store and server
+ */
+ private static function init() {
+ self::$server = new OC_OAuthServer(new OC_OAuthStore());
+ }
/**
* api actions
@@ -151,7 +160,7 @@ class OC_API {
*/
public static function checkLoggedIn(){
// Check OAuth
- if(!OC_OAuth::isAuthorised()){
+ if(!OC_OAuthServer::isAuthorised()){
OC_Response::setStatus(401);
die();
}