Sign-On Authentication (SOAP)

SOAP API Reference

Sign-On Authentication (SOAP)

 

SignOnWithToken

The SignOnWithToken operation facilitates the authentication of identity tokens and the issuing of session tokens during application sign-on.

 

Operation

string SignOnWithToken(string identityToken);

 

Parameters

Parameter Data Type Description
identityToken String The identity token provisioned during the merchant/company activation process.

 

Return Type

Data Type Description
String The limited-life sessionToken.
Note: The token expires every 30 minutes. Transaction Processing operations attempted with an expiredsessionToken results in an ExpiredTokenFault. To refresh the sessionToken, re-invoke SignOnWithToken

 

Exceptions

CWSFault AuthenticationFault
ExpiredTokenFault STSUnavailableFault
InvalidTokenFault
For additional details about each fault, please refer to Service Information Faults in the CWS Developer API Reference.

 

Code Snippets

public string SignOn(string identityToken = null)
{
     using (var = client = new CWSServiceInformationClient((ConfigurationManager.AppSettings["Bindings.StsSoap"]))
     {
          try
          {
               return client.SignOnWithToken(_identityToken);
          }
               SoalFaultHandler.HandleFaultException(ex);
          }
     }
}
public function signOn()
{
  if ($this->session_token == '')
  {
    try
    {
      $st = new SignOnWithToken ();
      $st->identityToken = $this->token->identityToken;
      $response = $this->serviceInfo->SignOnWithToken ( $st );
      $this->session_token = $response->SignOnWithTokenResult;
    }
    catch ( Exception $e )
    {
      echo '
SERVER ERROR: Error Signing On. 
 ';
      echo $this->serviceInfo->__getLastRequestHeaders();
      echo $this->serviceInfo->__getLastRequest();
      echo 'REQUEST
' . $this->serviceInfo->__getLastRequest ();
      $xmlFault = $this->serviceInfo->__getLastResponse ();
      $errors = handleSvcInfoFault ( $e, $xmlFault );
      echo $errors;
      exit ();
    }
  }
  return true;
}