summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/dav/lib/Connector/Sabre/BearerAuth.php4
-rw-r--r--build/integration/features/webdav-related.feature4
2 files changed, 6 insertions, 2 deletions
diff --git a/apps/dav/lib/Connector/Sabre/BearerAuth.php b/apps/dav/lib/Connector/Sabre/BearerAuth.php
index dd0a1bac292..f0e0f389c33 100644
--- a/apps/dav/lib/Connector/Sabre/BearerAuth.php
+++ b/apps/dav/lib/Connector/Sabre/BearerAuth.php
@@ -50,6 +50,10 @@ class BearerAuth extends AbstractBearer {
$this->session = $session;
$this->request = $request;
$this->principalPrefix = $principalPrefix;
+
+ // setup realm
+ $defaults = new \OCP\Defaults();
+ $this->realm = $defaults->getName();
}
private function setupUserFs($userId) {
diff --git a/build/integration/features/webdav-related.feature b/build/integration/features/webdav-related.feature
index b8ed1c4a778..4279a155ceb 100644
--- a/build/integration/features/webdav-related.feature
+++ b/build/integration/features/webdav-related.feature
@@ -8,7 +8,7 @@ Feature: webdav-related
Then the HTTP status code should be "401"
And there are no duplicate headers
And The following headers should be set
- |WWW-Authenticate|Basic realm="Nextcloud"|
+ |WWW-Authenticate|Basic realm="Nextcloud", Bearer realm="Nextcloud"|
Scenario: Unauthenticated call new dav path
Given using new dav path
@@ -16,7 +16,7 @@ Feature: webdav-related
Then the HTTP status code should be "401"
And there are no duplicate headers
And The following headers should be set
- |WWW-Authenticate|Basic realm="Nextcloud"|
+ |WWW-Authenticate|Basic realm="Nextcloud", Bearer realm="Nextcloud"|
Scenario: Moving a file
Given using old dav path