use Login controller

This commit is contained in:
Uwe Steinmann 2022-11-24 12:40:25 +01:00
parent 2556bf5b3f
commit 4e528975b8

View File

@ -153,6 +153,25 @@ class HTTP_WebDAV_Server_SeedDMS extends HTTP_WebDAV_Server
if($this->logger)
$this->logger->log('check_auth: type='.$type.', user='.$user.'', PEAR_LOG_INFO);
$controller = Controller::factory('Login', array('dms'=>$this->dms));
$controller->setParam('login', $user);
$controller->setParam('pwd', $pass);
$controller->setParam('source', 'webdav');
if(!$controller()) {
if($this->logger) {
$this->logger->log($controller->getErrorMsg(), PEAR_LOG_NOTICE);
$this->logger->log('check_auth: error authenicating user '.$user, PEAR_LOG_NOTICE);
}
return false;
}
if($this->logger)
$this->logger->log('check_auth: type='.$type.', user='.$user.' authenticated', PEAR_LOG_INFO);
$this->user = $controller->getUser();
return true;
$userobj = false;
/* Authenticate against LDAP server {{{ */