Skip to content

Commit

Permalink
Merge 00cd37a into fe2dcd3
Browse files Browse the repository at this point in the history
  • Loading branch information
cmull committed Nov 7, 2015
2 parents fe2dcd3 + 00cd37a commit f428395
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/pkgcloud/openstack/client.js
Expand Up @@ -89,6 +89,9 @@ Client.prototype._getIdentityOptions = function() {
else if (this.config.tenantName) {
options.tenantName = this.config.tenantName;
}
if (this.config.userId) {
options.userId = this.config.userId;
}
if (typeof this.config.useServiceCatalog === 'boolean') {
options.useServiceCatalog = this.config.useServiceCatalog;
}
Expand Down
11 changes: 11 additions & 0 deletions lib/pkgcloud/openstack/context/identity.js
Expand Up @@ -244,6 +244,17 @@ Identity.prototype._buildAuthenticationPayload = function () {
}
};
}
else if (self.options.password && self.options.userId && self.options.tenantId) {
self._authenticationPayload = {
auth: {
tenantId: self.options.tenantId,
passwordCredentials: {
userId: self.options.userId,
password: self.options.password
}
}
};
}
// Token and tenant are also valid inputs
else if (self.options.token && (self.options.tenantId || self.options.tenantName)) {
self._authenticationPayload = {
Expand Down

0 comments on commit f428395

Please sign in to comment.