Fix 3rdparty paths, initialise OAuth in correct order
This commit is contained in:
parent
9ec035e3d3
commit
e7f7693b2f
|
@ -37,12 +37,13 @@ class OC_OAuth {
|
||||||
*/
|
*/
|
||||||
private static function init(){
|
private static function init(){
|
||||||
// Include the libraries
|
// Include the libraries
|
||||||
require_once(OC::$THIRDPARTYROOT.'3rdparty/oauth-php/library/OAuthServer.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/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
|
// Create the server object
|
||||||
self::$server = new OAuthServer();
|
self::$server = new OAuthServer();
|
||||||
// Initialise the OAuth store
|
|
||||||
self::$store = OAuthStore::instance('owncloud');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -109,6 +110,7 @@ class OC_OAuth {
|
||||||
* @return string|int
|
* @return string|int
|
||||||
*/
|
*/
|
||||||
public static function isAuthorised(){
|
public static function isAuthorised(){
|
||||||
|
self::init();
|
||||||
if(OAuthRequestVerifier::requestIsSigned()){
|
if(OAuthRequestVerifier::requestIsSigned()){
|
||||||
try{
|
try{
|
||||||
$req = new OAuthRequestVerifier();
|
$req = new OAuthRequestVerifier();
|
||||||
|
|
Loading…
Reference in New Issue