Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'apps/dav/lib/Connector/PublicAuth.php')
-rw-r--r--apps/dav/lib/Connector/PublicAuth.php36
1 files changed, 8 insertions, 28 deletions
diff --git a/apps/dav/lib/Connector/PublicAuth.php b/apps/dav/lib/Connector/PublicAuth.php
index 426cbf871d7..cc51a249e75 100644
--- a/apps/dav/lib/Connector/PublicAuth.php
+++ b/apps/dav/lib/Connector/PublicAuth.php
@@ -44,28 +44,12 @@ use Sabre\DAV\Auth\Backend\AbstractBasic;
*/
class PublicAuth extends AbstractBasic {
private const BRUTEFORCE_ACTION = 'public_webdav_auth';
+ private ?IShare $share = null;
+ private IManager $shareManager;
+ private ISession $session;
+ private IRequest $request;
+ private Throttler $throttler;
- /** @var \OCP\Share\IShare */
- private $share;
-
- /** @var IManager */
- private $shareManager;
-
- /** @var ISession */
- private $session;
-
- /** @var IRequest */
- private $request;
-
- /** @var Throttler */
- private $throttler;
-
- /**
- * @param IRequest $request
- * @param IManager $shareManager
- * @param ISession $session
- * @param Throttler $throttler
- */
public function __construct(IRequest $request,
IManager $shareManager,
ISession $session,
@@ -88,7 +72,6 @@ class PublicAuth extends AbstractBasic {
*
* @param string $username
* @param string $password
- *
* @return bool
* @throws \Sabre\DAV\Exception\NotAuthenticated
*/
@@ -133,15 +116,12 @@ class PublicAuth extends AbstractBasic {
$this->throttler->registerAttempt(self::BRUTEFORCE_ACTION, $this->request->getRemoteAddress());
return false;
}
- } else {
- return true;
}
+ return true;
}
- /**
- * @return \OCP\Share\IShare
- */
- public function getShare() {
+ public function getShare(): IShare {
+ assert($this->share !== null);
return $this->share;
}
}