diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2018-04-24 09:49:27 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-24 09:49:27 +0200 |
commit | 1ceb081c9be32fd0bb6167171f7437852ab17207 (patch) | |
tree | 29bfda53b478f8b6cd5010ca9e7dd96d01678f62 /lib/private/Files | |
parent | 9339c7d20ff5383b360f79c0ded299c1bfc2e704 (diff) | |
parent | ba71918ad2f6fb336852fd492e5e819eb38201c9 (diff) | |
download | nextcloud-server-1ceb081c9be32fd0bb6167171f7437852ab17207.tar.gz nextcloud-server-1ceb081c9be32fd0bb6167171f7437852ab17207.zip |
Merge pull request #9280 from nextcloud/bugfix/noid/swift-v3-scope
Swift v3 requires setting a scope
Diffstat (limited to 'lib/private/Files')
-rw-r--r-- | lib/private/Files/ObjectStore/SwiftFactory.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/private/Files/ObjectStore/SwiftFactory.php b/lib/private/Files/ObjectStore/SwiftFactory.php index d10aaf467ae..8baaec985e8 100644 --- a/lib/private/Files/ObjectStore/SwiftFactory.php +++ b/lib/private/Files/ObjectStore/SwiftFactory.php @@ -108,6 +108,10 @@ class SwiftFactory { ]); if (isset($this->params['user']) && isset($this->params['user']['name'])) { + if (!isset($this->params['scope'])) { + throw new StorageAuthException('Scope has to be defined for V3 requests'); + } + return $this->auth(IdentityV3Service::factory($httpClient), $cacheKey); } else { return $this->auth(IdentityV2Service::factory($httpClient), $cacheKey); |