Sample Code

The code examples in the following sections show how to use the
LoginByToken
method with a holder-of-key security token. The code examples are based on the
LoginByTokenSample
project contained in the vCenter Single Sign-On SDK. The project is located in the
dotnet
samples directory (
SDK/ssoclient/dotnet/cs/samples/LoginByToken
).
  • Project file –
    LoginByToken.csproj
  • Sample code –
    LoginByTokenSample.cs
  • SOAP header manipulation code –
    CustomSecurityAssertionHok.cs