12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- <?php
- namespace OCA\Federation\DAV;
- use OCA\Federation\DbHandler;
- use OCP\Defaults;
- use Sabre\DAV\Auth\Backend\AbstractBasic;
- use Sabre\HTTP\RequestInterface;
- use Sabre\HTTP\ResponseInterface;
- class FedAuth extends AbstractBasic {
-
- public function __construct(
- private DbHandler $db,
- ) {
- $this->principalPrefix = 'principals/system/';
-
- $defaults = new Defaults();
- $this->realm = $defaults->getName();
- }
-
- protected function validateUserPass($username, $password) {
- return $this->db->auth($username, $password);
- }
-
- public function challenge(RequestInterface $request, ResponseInterface $response) {
- }
- }
|