vCenter Single Sign-On SDK Examples

The vCenter Single Sign-On SDK contains 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.
This manual describes two of the Java examples provided by the VMware SSO Client SDK:
The following table lists the sample files in the SDK:
VMware SSO Client SDK Sample Files – Java
Location
Examples
Description
SDK/ssoclient/java/JAXWS/samples/com/vmware/sso/client/samples/
AcquireBearerTokenByUserCredentialSample.java
Demonstrates how to use username and password credentials to obtain a bearer token.
AcquireHoKTokenByHoKTokenSample.java
Demonstrates how to exchange one holder-of-key token for another.
AcquireHoKTokenBySolutionCertificateSample.java
Demonstrates how a solution uses its private key and certificate to acquire a holder-of-key token.
AcquireHoKTokenByUserCredentialSample.java
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).
RenewTokenSample.java
Demonstrates how to renew a holder-of-key token.
ValidateTokenSample.java
Demonstrates how to validate a token.
SDK/ssoclient/java/JAXWS/samples/com/vmware/sso/client/soaphandlers/
HeaderHandlerResolver.java
Provides methods to manage the set of header handlers.
SamlTokenExtractionHandler.java
Extracts a SAML token from the vCenter Single Sign-On server response.
SamlTokenHandler.java
Adds a SAML token to a SOAP security header.
SSOHeaderhandler.java
Base class for header handler classes.
TimeStampHandler.java
Adds a timestamp element to a SOAP security header.
UserCredentialHandler.java
Adds a username token to a SOAP security header.
WsSecuritySignatureAssertionHandler.java
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.
WsSecurityUserCertificateSignatureHandler.java
Uses a private key and certificate to sign a SOAP message.
SDK/ssoclient/java/JAXWS/samples/com/vmware/vsphere/samples/
LoginByTokenSample.java
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/
HeaderCookieExtractionHandler.java
Extracts the vCenter HTTP session cookie from the response to a connection request.
HeaderCookieHandler.java
Inserts an HTTP cookie into a request.