The vCenter Single Sign-On SDK contains both C# and Java examples that show how to acquire, validate, and renew tokens. This manual describes examples that show how to obtain a holder-of-key token from a vCenter Single Sign-On server and how to use that token to login to a vCenter server.
Each example is implemented as a Visual Studio project that is contained in its own subdirectory in the samples directory. Each project subdirectory contains an example implementation and the corresponding Visual Studio project files. The following table lists the example projects.
This manual describes two of the Java examples provided by the VMware SSO Client SDK:
■
|
vCenter Single Sign-On Client Example (JAX-WS). This example shows how to obtain a holder-of-key token from the vCenter Single Sign-On server. |
■
|
LoginByToken Example (JAX-WS). This example shows how to use the token to login to vCenter server. |
The following table lists the sample files in the SDK:
SDK/ssoclient/java/JAXWS/samples/com/vmware/sso/client/samples/ |
||
Demonstrates how to use username and password credentials to obtain a bearer token. |
||
Demonstrates how to exchange one holder-of-key token for another. |
||
Demonstrates how a solution uses its private key and certificate to acquire a holder-of-key token. |
||
Demonstrates how to use username, password, and certificate credentials to obtain a holder-of-key token. See vCenter Single Sign-On Client Example (JAX-WS). |
||
SDK/ssoclient/java/JAXWS/samples/com/vmware/sso/client/soaphandlers/ |
||
Extracts a SAML token from the vCenter Single Sign-On server response. |
||
Uses SAML token assertion ID, private key, and certificate to sign a SOAP message. For use when using an existing token to acquire a new token. |
||
SDK/ssoclient/java/JAXWS/samples/com/vmware/vsphere/samples/ |
||
Demonstrates how to use a SAML token to login to a vCenter server. See LoginByToken Example (JAX-WS). |
||
SDK/ssoclient/java/JAXWS/samples/com/vmware/vsphere/soaphandlers/ |
||
Extracts the vCenter HTTP session cookie from the response to a connection request. |
||