public interface WSSVerification
WSSFactory factory = WSSFactory.getInstance(); WSSConsumingContext concont = factory.newWSSConsumingContext(); X509ConsumeCallbackHandler callbackhandler = generateCallbackHandler(); // see X509ConsumeCallbackHandler WSSVerification ver = factory.newWSSVerification(X509Token.class, callbackhandler); concont.add(ver);
WSSVerifyPart
Modifier and Type | Field and Description |
---|---|
static int |
ADDRESSING_HEADERS
The keyword for the WS-Addressing headers.
|
static int |
BODY
The keyword for the SOAP message body.
|
static java.lang.String |
C14N
The URI for the inclusive canonicalization algorithm, C14n:
http://www.w3.org/2001/10/xml-c14n#.
|
static java.lang.String |
EXC_C14N
The URI for the exclusive canonicalization algorithm, Exc-C14n:
http://www.w3.org/2001/10/xml-exc-c14n#.
|
static java.lang.String |
HMAC_SHA1
The URI for the signature algorithm, HMAC_SHA1:
http://www.w3.org/2000/09/xmldsig#hmac-sha1.
|
static java.lang.String |
RSA_SHA1
The URI for the signature algorithm, RSA_SHA1:
http://www.w3.org/2000/09/xmldsig#rsa-sha1.
|
static int |
TIMESTAMP
The keyword for the creation and expiration time stamp information.
|
Modifier and Type | Method and Description |
---|---|
void |
addAllowedCanonicalizationMethod(java.lang.String algorithm)
Adds the canonicalization method to allow for the signature verification.
|
void |
addAllowedSignatureMethod(java.lang.String algorithm)
Adds the signature method to allow for the signature verification.
|
void |
addRequiredVerifyHeader(javax.xml.namespace.QName header)
Adds the header in the SOAP Header, specified by QName, as a verification part.
|
void |
addRequiredVerifyPart(int keyword)
Adds the keyword of the verification part such as WSSVerification.BODY WSSVerification.ADDRESSING_HEADERS, or
WSSVerification.TIMESTAMP.
|
void |
addRequiredVerifyPart(WSSVerifyPart header)
Adds the header in the SOAP Header, specified by QName, as a verification part.
|
void |
addRequiredVerifyPartByXPath(java.lang.String xpath)
Adds the XPath expression as a verification part.
|
void |
addToken(java.lang.Class tokenClass,
javax.security.auth.callback.CallbackHandler callbackHandler)
Adds the information of the candidate security token that is used for the signature verification.
|
void |
addToken(java.lang.Class tokenClass,
javax.security.auth.callback.CallbackHandler callbackHandler,
java.lang.String loginConfigName)
Adds the information of the candidate security token that is used for the signature verification.
|
void |
requireSignatureConfirmation()
Requires the signature confirmation.
|
static final int BODY
static final int ADDRESSING_HEADERS
static final int TIMESTAMP
static final java.lang.String RSA_SHA1
static final java.lang.String HMAC_SHA1
static final java.lang.String EXC_C14N
static final java.lang.String C14N
void addRequiredVerifyPart(int keyword) throws WSSException
keyword
- verification partWSSException
- if the keyword is not valid.void addRequiredVerifyPart(WSSVerifyPart header)
header
- verification partvoid addRequiredVerifyPartByXPath(java.lang.String xpath)
xpath
- verification partvoid addRequiredVerifyHeader(javax.xml.namespace.QName header)
header
- verification partvoid addAllowedCanonicalizationMethod(java.lang.String algorithm) throws WSSException
algorithm
- canonicalization algorithmWSSException
- the algorithm is not supportedvoid addAllowedSignatureMethod(java.lang.String algorithm) throws WSSException
algorithm
- WSSException
- the algorithm is not supportedvoid addToken(java.lang.Class tokenClass, javax.security.auth.callback.CallbackHandler callbackHandler, java.lang.String loginConfigName) throws WSSException
tokenClass
- class of the security tokencallbackHandler
- callback handlerloginConfigName
- name of the JAAS login configurationWSSException
- if the arguments are not valid.void addToken(java.lang.Class tokenClass, javax.security.auth.callback.CallbackHandler callbackHandler) throws WSSException
tokenClass
- class of the security tokencallbackHandler
- callback handlerWSSException
- if the arguments are not valid.void requireSignatureConfirmation()