com.pingidentity.sts.clientapi.protocol
Class STSMessage

java.lang.Object
  extended by com.pingidentity.sts.clientapi.protocol.STSMessage

public class STSMessage
extends java.lang.Object

Represents SOAP message with RST to the STS server.


Constructor Summary
STSMessage(java.lang.String wsaAction)
          Creates STSMessage.
STSMessage(java.lang.String wsaAction, int wsseCreatedOffset, int wsseLifetime)
          Creates STSMessage.
 
Method Summary
 void addSecurityToken(org.w3c.dom.Element token)
          Adds a security token to the message.
 void createRstElement(RequestSecurityTokenData rstData, org.w3c.dom.Element token)
          Creates RST.
 void createRstElement(RequestSecurityTokenData rstData, org.w3c.dom.Element token, java.lang.String tokenType, SecurityTokenReferenceFactory referenceFactory)
          Creates RST.
 void sign(javax.security.auth.x500.X500PrivateCredential credential, java.lang.String certTokenId)
          Signs the message with given credential.
 org.w3c.dom.Document toDocument()
          Returns DOM presentation of the message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

STSMessage

public STSMessage(java.lang.String wsaAction)
           throws STSClientException
Creates STSMessage.

Parameters:
wsaAction - the WSA action
Throws:
STSClientException - if underlying SOAPException occurs

STSMessage

public STSMessage(java.lang.String wsaAction,
                  int wsseCreatedOffset,
                  int wsseLifetime)
           throws STSClientException
Creates STSMessage.

Parameters:
wsaAction - the WSA action
wsseCreatedOffset -
wsseLifetime - security header lifetime @throws STSClientException if underlying SOAPException occurs
Throws:
STSClientException
Method Detail

addSecurityToken

public void addSecurityToken(org.w3c.dom.Element token)
                      throws STSClientException
Adds a security token to the message.

Parameters:
token - the token
Throws:
STSClientException - if underlying SOAPException occurs

sign

public void sign(javax.security.auth.x500.X500PrivateCredential credential,
                 java.lang.String certTokenId)
          throws STSClientException
Signs the message with given credential.

Parameters:
credential - the credential for creating the Signature.
certTokenId - if present use this id for referencing to an X509v3 token in the KeyInfo element.
Throws:
STSClientException - if something goes wrong

toDocument

public org.w3c.dom.Document toDocument()
                                throws STSClientException
Returns DOM presentation of the message.

Returns:
DOM presentation of the messsage
Throws:
STSClientException

createRstElement

public void createRstElement(RequestSecurityTokenData rstData,
                             org.w3c.dom.Element token,
                             java.lang.String tokenType,
                             SecurityTokenReferenceFactory referenceFactory)
                      throws STSClientException
Creates RST. This method should be called before the Message is sent.

Parameters:
rstData - the data for creating RST
token - token for validation
tokenType - the token type
referenceFactory - a reference factory
Throws:
STSClientException - if something goes wrong

createRstElement

public void createRstElement(RequestSecurityTokenData rstData,
                             org.w3c.dom.Element token)
                      throws STSClientException
Creates RST.

Parameters:
rstData - the data for creating RST
token - token for validation
Throws:
STSClientException - if something goes wrong


Copyright © 2006-2009 Ping Identity Corporation. All Rights Reserved.