Skip to content

Running an STS Client

Run a sample STS Client

The following sample demonstrates the steps to run a Security Token Service (STS) client. The STS issues a security token to authenticate a user for your client application using WS-Trust protocols.

Before you begin

You need to configure WS-Trust for WSO2 Identity Server.

To run the STS client:

  1. Clone the Identity Server samples repository.

  2. In the cloned directory, navigate to SAMPLES-IS/sts/sts-client directory to build the STS client.

    Info

    The sts-client sample sends the username and password defined in the SAMPLES-IS/sts/sts-client/src/main/resources/client.properties file. WSO2 Identity Server authenticates if the user is in the system, and if the user is in the system, a token is sent to the requesting party, which is the sts-client application in this case.

    The default username and password defined are that of the default super administrator, and you can change it accordingly.

    ut.username=admin
    ut.password=admin
  3. Build the client using mvn install.

  4. Once the client is built successfully, run the sts-client.sh file in Unix or sts-client.bat in Windows.

You can see that the SAML token issued from the STS is being printed by the client.

Note

The connection refused error occurs when the STS client attempts to send the received SAML token to a service that is not running in this case.

Top