Identity Class
Identity object. Identity objects represent an individual identity from Identity Services.
Constructor
Identity
(
-
jsonObject
Parameters:
-
jsonObject
ObjectThe JSON respone from Identity Services.
Item Index
Methods
isExpired
()
Boolean
Check if the current token has expired.
Returns:
Boolean:
TRUE if the token as expired and FALSE if still valid.
roles
()
Array
Get the user roles
Returns:
Array:
The roles a user has.
serviceByName
(
Object
-
name
-
region
Given a service name, get the service endpoint.
This also takes a zone name.
Parameters:
-
name
StringThe name of the service, e.g. 'objectStorage' or 'ext:cdn'.
-
region
StringThe name of the availability zone, e.g. 'az-1.region-a.geo-1'
Returns:
Object:
The service record.
serviceCatalog
()
Object
The catalog of activated services.
Returns:
Object:
The service catalog.
tenantId
()
String
Get the current tenantId.
Returns:
String:
The tenantId.
tenantName
()
String
Get the current tenantName.
Returns:
String:
The tenantName.
token
()
String
Get the token.
Returns:
String:
The token.
tokenDetails
()
Object
The details around a token including expires, tenant, etc.
Returns:
Object:
An object with the details about the token.
user
()
Object
Get the user object.
Returns:
Object:
The user object.