User proper username + pass

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
Roeland Jago Douma 2018-02-21 16:26:58 +01:00 committed by Robin Appelman
parent fe05ecfd16
commit 812ea354d0
No known key found for this signature in database
GPG Key ID: 42B69D8A64526EFB
1 changed files with 2 additions and 2 deletions

View File

@ -79,7 +79,7 @@ class SwiftFactory {
$this->params['autocreate'] = false;
}
if (isset($this->params['user']) && is_array($this->params['user'])) {
$userName = $this->params['user']['id'];
$userName = $this->params['user']['name'];
} else {
if (!isset($this->params['username']) && isset($this->params['user'])) {
$this->params['username'] = $this->params['user'];
@ -102,7 +102,7 @@ class SwiftFactory {
'handler' => HandlerStack::create()
]);
if (isset($this->params['user']) && isset($this->params['user']['id'])) {
if (isset($this->params['user']) && isset($this->params['user']['name'])) {
return $this->auth(IdentityV3Service::factory($httpClient), $cacheKey);
} else {
return $this->auth(IdentityV2Service::factory($httpClient), $cacheKey);