diff --git a/lib/api.php b/lib/api.php index c8bd0aec2f..8fdfc63070 100644 --- a/lib/api.php +++ b/lib/api.php @@ -23,7 +23,7 @@ * License along with this library. If not, see . * */ - + class OC_API { private static $server; @@ -32,7 +32,7 @@ class OC_API { * initialises the OAuth store and server */ private static function init() { - self::$server = new OC_OAuthServer(new OC_OAuthStore()); + self::$server = new OC_OAuth_Server(new OC_OAuth_Store()); } /** diff --git a/lib/oauth.php b/lib/oauth/server.php similarity index 90% rename from lib/oauth.php rename to lib/oauth/server.php index b72d9aab44..c563c52760 100644 --- a/lib/oauth.php +++ b/lib/oauth/server.php @@ -22,7 +22,9 @@ * */ -class OC_OAuthServer extends OAuthServer { +require_once(OC::$THIRDPARTYROOT.'/3rdparty/OAuth/OAuth.php'); + +class OC_OAuth_Server extends OAuthServer { public function fetch_request_token(&$request) { $this->get_version($request); @@ -34,6 +36,11 @@ class OC_OAuthServer extends OAuthServer { return $this->data_store->new_request_token($consumer, $scope, $callback); } + /** + * authorises a request token + * @param string $request the request token to authorise + * @return What does it return? + */ public function authoriseRequestToken(&$request) { $this->get_version($request); $consumer = $this->get_consumer($request); diff --git a/lib/oauth/store.php b/lib/oauth/store.php new file mode 100644 index 0000000000..2f58e46b5b --- /dev/null +++ b/lib/oauth/store.php @@ -0,0 +1,29 @@ +. +* +*/ + +class OC_OAuth_Store extends OAuthDataStore { + + // To follow. + +} \ No newline at end of file diff --git a/settings/oauth.php b/settings/oauth.php index b04c798b1b..7f30161d85 100644 --- a/settings/oauth.php +++ b/settings/oauth.php @@ -9,7 +9,7 @@ require_once('../lib/base.php'); // Logic $operation = isset($_GET['operation']) ? $_GET['operation'] : ''; -$server = new OC_OAuthServer(new OC_OAuthStore()); +$server = new OC_OAuth_Server(new OC_OAuth_Store()); switch($operation){ case 'register':