From 639ba526d0eb763be360e5c57d194758291c3ff0 Mon Sep 17 00:00:00 2001 From: Lukas Reschke Date: Thu, 18 May 2017 21:38:55 +0200 Subject: Adjust realm from SabreDAV to Nextcloud Signed-off-by: Lukas Reschke --- apps/dav/lib/Connector/Sabre/BearerAuth.php | 4 ++++ build/integration/features/webdav-related.feature | 4 ++-- 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 -- cgit v1.2.3