5.1

Table Of Contents
Table 3-2. Authorization Header Attributes and Values
Attribute Name Attribute Value
token
The compressed, encoded identity assertion from your
SAML identity provider.
org
The name of your vCloud Director organization.
See “Example: Create a Login Session Using a SAML Identity Provider,” on page 47.
5 Examine the response.
The response code indicates whether the request succeeded, or how it failed.
n
If the authentication header is missing, the server returns HTTP response code 403.
n
If the credentials supplied in the authentication header are invalid, the server returns HTTP response
code 401.
n
If the request is successful, the server returns HTTP response code 200 (OK) and headers that include
an authorization header of the form:
x-vcloud-authorization:
token
This header must be included in each subsequent vCloud API request.
The Session element returned from a successful login contains one or more URLs from which you can
begin browsing.
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 197.
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. The user
name is included in the encoded credentials.
Request:
POST https://vcloud.example.com/api/sessions
Authorization: SIGN token="
compressed-encoded-credentials
",org="Finance"
Accept: application/*+xml;version=5.1
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"
user="bob"
org="Finance"
... >
<Link
rel="down"
type="application/vnd.vmware.vcloud.orgList+xml"
href="https://vcloud.example.com/api/org"/>
Chapter 3 Exploring a Cloud
VMware, Inc. 47