xref: /plugin/davcal/authBackendDokuwiki.php (revision c42afaeb1888e1c5eab2cc232f72177eca9cb25d)
1a1a3b679SAndreas Boehler<?php
2a1a3b679SAndreas Boehler
3cb71a62aSAndreas Boehler/**
4cb71a62aSAndreas Boehler * DokuWiki SabreDAV Auth Backend
5cb71a62aSAndreas Boehler *
6cb71a62aSAndreas Boehler * Check a user ID / password combo against DokuWiki's auth system
7cb71a62aSAndreas Boehler */
8cb71a62aSAndreas Boehler
9a1a3b679SAndreas Boehlerclass DokuWikiSabreAuthBackend extends Sabre\DAV\Auth\Backend\AbstractBasic
10a1a3b679SAndreas Boehler{
11a1a3b679SAndreas Boehler    protected function validateUserPass($username, $password)
12a1a3b679SAndreas Boehler    {
13a1a3b679SAndreas Boehler        global $auth;
1421d04f73SAndreas Boehler        global $conf;
1521d04f73SAndreas Boehler        $ret = $auth->checkPass($username, $password);
16*c42afaebSscottleechua        \dokuwiki\Logger::debug('DAVCAL', 'Auth backend initialized', __FILE__, __LINE__);
17*c42afaebSscottleechua        \dokuwiki\Logger::debug('DAVCAL', 'checkPass called for username '.$username.' with result '.$ret, __FILE__, __LINE__);
1821d04f73SAndreas Boehler        return $ret;
19a1a3b679SAndreas Boehler    }
20a1a3b679SAndreas Boehler}
21