com.ibm.websphere.wssecurity.wssapi.signature

Interface WSSSignature


  1. public interface WSSSignature
This interface is responsible for the signature component. The following values are the default values for WSSSignature interface: This instace is generated by using a the security token. Following is the sample code to configure the signature. The sample code of generating the callbackhandler is shown in the X509Token.
    WSSFactory factory = WSSFactory.getInstance();
    WSSGenerationContext gencont = factory.newWSSGenerationContext();

    X509GenerateCallbackHandler callbackhandler = generateCallbackHandler();
    SecurityToken token = factory.newSecurityToken(X509Token.class, callbackHandler);
    WSSSignature sig = factory.newWSSSignature(token);

    gencont.add(sig);
 
See Also:
WSSSignPart

Field Summary

Modifier and Type Field and Description
  1. static
  2. int
ADDRESSING_HEADERS
The keyword for the WS-Addressing headers that are defined by the Web Services Addressing(WS-Addressing) specification.
  1. static
  2. int
BODY
The keyword for the SOAP body.
  1. static
  2. java.lang.String
C14N
The URI for the inclusive canonicalization algorithm, C14n: http://www.w3.org/2001/10/xml-c14n#.
  1. static
  2. java.lang.String
EXC_C14N
The URI for the exclusive canonicalization algorithm, Exc-C14n: http://www.w3.org/2001/10/xml-exc-c14n#.
  1. static
  2. java.lang.String
HMAC_SHA1
The URI for the signature algorithm, HMAC_SHA1: http://www.w3.org/2000/09/xmldsig#hmac-sha1.
  1. static
  2. java.lang.String
RSA_SHA1
The URI for the signature algorithm, RSA_SHA1: http://www.w3.org/2000/09/xmldsig#rsa-sha1.
  1. static
  2. int
TIMESTAMP
The keyword for the creation and expiration time stamp information.

Method Summary

Modifier and Type Method and Description
  1. void
addSignHeader(javax.xml.namespace.QName header)
Adds the header in the SOAP Header, specified by QName, as a signature part.
  1. void
addSignPart(int keyword)
Adds the keyword for the signature part: BODY, ADDRESSING_HEADERS, or TIMESTAMP.
  1. void
addSignPart(SecurityToken securityToken)
Adds the SecurityToken object as a signature part.
  1. void
addSignPart(WSSSignPart part)
Adds the WSSSignaturePart object as a signature part.
  1. void
addSignPart(WSSTimestamp timestamp)
Adds the WSSTimestamp object as a signature part.
  1. void
addSignPartByXPath(java.lang.String xpath)
Adds an XPath expression as a signature part.
  1. void
requireSignatureConfirmation()
Stores the its value of the signature confirmation in order to validate the signature confirmation after the receiving the message with it.
  1. void
setCanonicalizationMethod(java.lang.String algorithm)
Sets the canonicalization method.
  1. void
setSignatureMethod(java.lang.String algorithm)
Sets the signature method.
  1. void
setTokenReference(int refType)
Sets the type of token reference. such as Field Detail

BODY

  1. static final int BODY
The keyword for the SOAP body.

ADDRESSING_HEADERS

  1. static final int ADDRESSING_HEADERS
The keyword for the WS-Addressing headers that are defined by the Web Services Addressing(WS-Addressing) specification.

TIMESTAMP

  1. static final int TIMESTAMP
The keyword for the creation and expiration time stamp information.

RSA_SHA1

  1. static final java.lang.String RSA_SHA1
The URI for the signature algorithm, RSA_SHA1: http://www.w3.org/2000/09/xmldsig#rsa-sha1.

HMAC_SHA1

  1. static final java.lang.String HMAC_SHA1
The URI for the signature algorithm, HMAC_SHA1: http://www.w3.org/2000/09/xmldsig#hmac-sha1.

EXC_C14N

  1. static final java.lang.String EXC_C14N
The URI for the exclusive canonicalization algorithm, Exc-C14n: http://www.w3.org/2001/10/xml-exc-c14n#.

C14N

  1. static final java.lang.String C14N
The URI for the inclusive canonicalization algorithm, C14n: http://www.w3.org/2001/10/xml-c14n#.

Method Detail

addSignPart

  1. void addSignPart(int keyword)
  2. throws WSSException
Adds the keyword for the signature part: BODY, ADDRESSING_HEADERS, or TIMESTAMP.
Parameters:
keyword - signature part
Throws:
WSSException - if the part is not valid.

addSignPart

  1. void addSignPart(WSSSignPart part)
Adds the WSSSignaturePart object as a signature part.
Parameters:
part - signature part

addSignPart

  1. void addSignPart(SecurityToken securityToken)
Adds the SecurityToken object as a signature part.
Parameters:
securityToken - signature part

addSignPart

  1. void addSignPart(WSSTimestamp timestamp)
Adds the WSSTimestamp object as a signature part.
Parameters:
timestamp - signature part.

addSignPartByXPath

  1. void addSignPartByXPath(java.lang.String xpath)
Adds an XPath expression as a signature part.
Parameters:
xpath - XPath expression of a signature part

addSignHeader

  1. void addSignHeader(javax.xml.namespace.QName header)
Adds the header in the SOAP Header, specified by QName, as a signature part.
Parameters:
header - signature part

setSignatureMethod

  1. void setSignatureMethod(java.lang.String algorithm)
  2. throws WSSException
Sets the signature method.
Parameters:
algorithm - signature algorithm
Throws:
WSSException - the algorithm is not supported

setCanonicalizationMethod

  1. void setCanonicalizationMethod( java.lang.String algorithm)
  2. throws WSSException
Sets the canonicalization method.
Parameters:
algorithm - canonicalization method
Throws:
WSSException - the algorithm is not supported

setTokenReference

  1. void setTokenReference(int refType)
  2. throws WSSException
Parameters:
refType - type of token reference
Throws:
WSSException - if the reference type is not valid.

requireSignatureConfirmation

  1. void requireSignatureConfirmation( )
Stores the its value of the signature confirmation in order to validate the signature confirmation after the receiving the message with it. This method is called if the response message is expected to attach the signature confirmation into. The signature confirmation is defined in the OASIS WS-Security Version 1.1 Specification.
IBM WebSphere Application ServerTM
Release 8