The code snippet below demonstrates using the PingFederate Java STS Client SDK to retrieve a WAM session token through the PingFederate STS.

 // Configure STS Client (SP side / IdP Connection)
 STSClientConfiguration stsConfig = new STSClientConfiguration();
 stsConfig.setStsEndpoint("https://sp.domain.com:9031/sp/sts.wst");
 stsConfig.setOutTokenType(TokenType.BINARY);

 // Instantiate the STSClient
 STSClient stsClient = new STSClient(stsConfig);

 // Send an RST Issue request to PingFederate STS
 Element wamsessionToken = stsClient.issueToken(samlToken);