]> git.mxchange.org Git - friendica-addons.git/blob - dav/SabreDAV/lib/Sabre/DAV/Auth/IBackend.php
Merge branch 'master' of git://github.com/friendica/friendica-addons
[friendica-addons.git] / dav / SabreDAV / lib / Sabre / DAV / Auth / IBackend.php
1 <?php
2
3 /**
4  * This is the base class for any authentication object.
5  *
6  * @package Sabre
7  * @subpackage DAV
8  * @copyright Copyright (C) 2007-2012 Rooftop Solutions. All rights reserved.
9  * @author Evert Pot (http://www.rooftopsolutions.nl/) 
10  * @license http://code.google.com/p/sabredav/wiki/License Modified BSD License
11  */
12 interface Sabre_DAV_Auth_IBackend {
13
14     /**
15      * Authenticates the user based on the current request.
16      *
17      * If authentication is successful, true must be returned.
18      * If authentication fails, an exception must be thrown.
19      *
20      * @param Sabre_DAV_Server $server
21      * @param string $realm
22      * @return bool
23      */
24     function authenticate(Sabre_DAV_Server $server,$realm);
25
26     /**
27      * Returns information about the currently logged in username.
28      *
29      * If nobody is currently logged in, this method should return null.
30      *
31      * @return string|null
32      */
33     function getCurrentUser();
34
35 }
36