Skip to content

Commit 4ed8a55

Browse files
author
glen
committed
close #37 from a bus!
1 parent d440a44 commit 4ed8a55

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

lib/openstack.inc

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,14 @@ ENDAUTHTEMPLATE
301301
return FALSE;
302302
$this->token = $resp->access->token->id;
303303
$this->expiration = strtotime($resp->access->token->expires);
304-
$this->tenant = $resp->access->token->tenant->id;
304+
/**
305+
* In some cases, the tenant name/id is not returned
306+
* as part of the auth token, so we check for it before
307+
* we set it. This occurs with pure Keystone, but not
308+
* with the Rackspace auth.
309+
*/
310+
if (isset($resp->access->token->tenant))
311+
$this->tenant = $resp->access->token->tenant->id;
305312
/**
306313
* Note the different capitalization; I'm trying to use CamelCase
307314
* consistently in these bindings, but the actual serviceCatalog is

0 commit comments

Comments
 (0)