|
|
|
@ -37,12 +37,13 @@ class OC_OAuth { |
|
|
|
|
*/ |
|
|
|
|
private static function init(){ |
|
|
|
|
// Include the libraries |
|
|
|
|
require_once(OC::$THIRDPARTYROOT.'3rdparty/oauth-php/library/OAuthServer.php'); |
|
|
|
|
require_once(OC::$THIRDPARTYROOT.'3rdparty/oauth-php/library/OAuthStore.php'); |
|
|
|
|
require_once(OC::$THIRDPARTYROOT.'/3rdparty/oauth-php/library/OAuthServer.php'); |
|
|
|
|
require_once(OC::$THIRDPARTYROOT.'/3rdparty/oauth-php/library/OAuthStore.php'); |
|
|
|
|
require_once(OC::$THIRDPARTYROOT.'/3rdparty/oauth-php/library/OAuthRequestVerifier.php'); |
|
|
|
|
// Initialise the OAuth store |
|
|
|
|
self::$store = OAuthStore::instance('Session'); |
|
|
|
|
// Create the server object |
|
|
|
|
self::$server = new OAuthServer(); |
|
|
|
|
// Initialise the OAuth store |
|
|
|
|
self::$store = OAuthStore::instance('owncloud'); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
@ -109,6 +110,7 @@ class OC_OAuth { |
|
|
|
|
* @return string|int |
|
|
|
|
*/ |
|
|
|
|
public static function isAuthorised(){ |
|
|
|
|
self::init(); |
|
|
|
|
if(OAuthRequestVerifier::requestIsSigned()){ |
|
|
|
|
try{ |
|
|
|
|
$req = new OAuthRequestVerifier(); |
|
|
|
|