diff options
author | F. Kooman <fkooman@tuxed.net> | 2012-10-27 21:17:53 +0400 |
---|---|---|
committer | F. Kooman <fkooman@tuxed.net> | 2012-10-27 21:17:53 +0400 |
commit | fb2d261eef7c084d2c272c7b001bfc3d6a8030f1 (patch) | |
tree | 05649cd7bfe8a8cdf1975c5219b3f33967d74995 /user_oauth | |
parent | fd96de997563718ae495a77aba508f292ad6e9ef (diff) |
first working version of owncloud RS
Diffstat (limited to 'user_oauth')
-rw-r--r-- | user_oauth/AbstractBearer.php | 7 | ||||
-rw-r--r-- | user_oauth/DEV | 2 | ||||
-rw-r--r-- | user_oauth/appinfo/version | 2 | ||||
-rw-r--r-- | user_oauth/webdav.php | 4 |
4 files changed, 10 insertions, 5 deletions
diff --git a/user_oauth/AbstractBearer.php b/user_oauth/AbstractBearer.php index 37570668b..062902b30 100644 --- a/user_oauth/AbstractBearer.php +++ b/user_oauth/AbstractBearer.php @@ -1,8 +1,8 @@ <?php -require_once 'lib/RemoteResourceServer.php'; +require_once '3rdparty/RemoteResourceServer.php'; -abstract class Sabre_DAV_Auth_Backend_AbstractBearer implements Sabre_DAV_Auth_IBackend { +class OC_Connector_Sabre_Auth_Bearer implements Sabre_DAV_Auth_IBackend { protected $currentUser; protected $tokenInfoEndpoint; @@ -26,6 +26,9 @@ abstract class Sabre_DAV_Auth_Backend_AbstractBearer implements Sabre_DAV_Auth_I $attributes = $rs->getAttributes(); $this->currentUser = $attributes["uid"][0]; + // maybe need to set that we are logged in...? + OC_Util::setupFS($this->currentUser); + return true; } diff --git a/user_oauth/DEV b/user_oauth/DEV index 667777137..fb5c183ce 100644 --- a/user_oauth/DEV +++ b/user_oauth/DEV @@ -2,6 +2,8 @@ We need to implement this interface for Bearer Auth SabreDAV/lib/Sabre/DAV/Auth/IBackend.php +use /Library/WebServer/Documents/owncloud/apps/files/appinfo/remote.php instead of files/webdav.php + lib/connector/sabre/auth.php extend some stuff there instead, should be doable! diff --git a/user_oauth/appinfo/version b/user_oauth/appinfo/version index d3827e75a..9459d4ba2 100644 --- a/user_oauth/appinfo/version +++ b/user_oauth/appinfo/version @@ -1 +1 @@ -1.0 +1.1 diff --git a/user_oauth/webdav.php b/user_oauth/webdav.php index e8850d474..099ccdbc2 100644 --- a/user_oauth/webdav.php +++ b/user_oauth/webdav.php @@ -25,7 +25,7 @@ // only need filesystem apps $RUNTIME_APPTYPES=array('filesystem','authentication'); -require_once '../lib/base.php'; +#require_once '../lib/base.php'; require_once 'AbstractBearer.php'; @@ -40,7 +40,7 @@ $publicDir = new OC_Connector_Sabre_Directory(''); // Fire up server $server = new Sabre_DAV_Server($publicDir); -$server->setBaseUri(OC::$WEBROOT. '/files/webdav.php'); +$server->setBaseUri($baseuri); // Load plugins $server->addPlugin(new Sabre_DAV_Auth_Plugin($authBackend, 'ownCloud')); |