3
include_once 'HTTP/WebDAV/Server.php';
6
* The Horde_RPC_webdav class provides a WebDAV implementation of the
9
* $Horde: framework/RPC/RPC/webdav.php,v 1.1.12.1 2005/01/03 12:19:12 jan Exp $
11
* Copyright 2004-2005 Chuck Hagenbuch <chuck@horde.org>
13
* See the enclosed file COPYING for license information (LGPL). If you
14
* did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
16
* @author Chuck Hagenbuch <chuck@horde.org>
17
* @version $Revision: 1.1.12.1 $
21
class Horde_RPC_webdav extends Horde_RPC {
24
* Resource handler for the WebDAV server.
25
* @var object HTTP_WebDAV_Server_Horde $_server
30
* WebDav server constructor.
33
* @return object An RPC server instance
35
function Horde_RPC_xmlrpc()
39
$this->_server = &new HTTP_WebDAV_Server_Horde();
43
* Sends an RPC request to the server and returns the result.
45
* @param string The raw request string.
47
* @return string The XML encoded response from the server.
49
function getResponse($request)
51
$this->_server->ServeRequest();
56
* WebDAV handles authentication internally, so bypass the
57
* system-level auth check by just returning true here.
67
* Horde extension of the base HTTP_WebDAV_Server class.
71
class HTTP_WebDAV_Server_Horde extends HTTP_WebDAV_Server {
76
* @param array &$params Array of input and output parameters.
77
* <br><b>input</b><ul>
80
* <br><b>output</b><ul>
84
* @return integer HTTP-Statuscode.
86
function GET(&$params)
92
* Check authentication. We always return true here since we
93
* handle permissions based on the resource that's requested, but
94
* we do record the authenticated user for later use.
96
* @param string $type Authentication type, e.g. "basic" or "digest"
97
* @param string $username Transmitted username.
98
* @param string $password Transmitted password.
100
* @return boolean Authentication status. Always true.
102
function check_auth($type, $username, $password)
104
$auth = &Auth::singleton($GLOBALS['conf']['auth']['driver']);
105
$auth->authenticate($username, array('password' => $password));