]> source.dussan.org Git - nextcloud-server.git/commitdiff
Adjust realm from SabreDAV to Nextcloud
authorLukas Reschke <lukas@statuscode.ch>
Thu, 18 May 2017 19:38:55 +0000 (21:38 +0200)
committerLukas Reschke <lukas@statuscode.ch>
Thu, 18 May 2017 19:38:55 +0000 (21:38 +0200)
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
apps/dav/lib/Connector/Sabre/BearerAuth.php
build/integration/features/webdav-related.feature

index dd0a1bac29264070741cc39762dc16f7d102f6e8..f0e0f389c33bb946d22e08295794a048f7e47c6b 100644 (file)
@@ -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) {
index b8ed1c4a77872fd28fbf75648816f0bb8bbfaa5a..4279a155ceb54a86cb3c6602727f8b19b2b2ec87 100644 (file)
@@ -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