5.5

Table Of Contents
The list of URLs in the Session object is based on the role and privileges of the authenticated user. A Session
object expires after a configurable interval of client inactivity. To change the length of this client inactivity
timeout, a system administrator can change the value of SessionTimeoutMinutes in the system's
GeneralSettings. See “Retrieve or Update System Settings,” on page 239.
A Session object can be deleted by its owner or an administrator. After your Session expires or is deleted,
you are not authenticated.
Example: Create a Login Session Using a SAML Identity Provider
This example shows a login request and response for a user of a SAML identity provider logging in to the
Finance organization of a cloud whose login URL is https://vcloud.example.com/api/sessions. This
example shows two varieties of the request.
Request (bearer token):
POST https://vcloud.example.com/api/sessions
Authorization: SIGN token="compressed-encoded-credentials",
org="Finance"
Accept: application/*+xml;version=5.5
When using a SAML assertion that provides holder-of-key (HOK) subject confirmation, the request header
must include signature and signature_alg attributes, as shown in this example, which assumes a signature
created with a SHA encoding and RSA encryption algorithms:
Request (holder-of-key token):
POST https://vcloud.example.com/api/sessions
Authorization: SIGN token="compressed-encoded-credentials",
org="Finance",
signature="encoded-signature"
signature_alg="SHA1withRSA"
Accept: application/*+xml;version=5.5
The response is the same in both cases.
Response:
200 OK
x-vcloud-authorization: cn9uYmdugN8E2j96+5Lqrc3YBvFsEgDHXzyfJrJ/6bM=
Content-Type: application/vnd.vmware.vcloud.session+xml
...
<Session
xmlns="http://www.vmware.com/vcloud/v1.5"
userUrn="urn:vcloud:user:fe50b0b5-..."
user="bob"
org="Finance"
... >
<Link
rel="down"
type="application/vnd.vmware.vcloud.org+xml"
name="System"
href="https://vcloud.example.com/api/org/5" />
<Link
rel="down"
type="application/vnd.vmware.vcloud.query.queryList+xml"
href="https://vcloud.example.com/api/query" />
<Link
vCloud API Programming Guide
48 VMware, Inc.