public class WSSSignatureProvider extends AMSignatureProvider
WSSSignatureProvider
is a class for signing and
signature verification of WSS XML Documents which implements
AMSignatureProvider
.keystore
Constructor and Description |
---|
WSSSignatureProvider()
Creates a new instance of WSSSignatureProvider
|
Modifier and Type | Method and Description |
---|---|
Element |
signWithBinarySecurityToken(Document doc,
Certificate cert,
String algorithm,
List ids,
String referenceType)
Sign part of the xml document referered by the supplied a list
of id attributes of nodes
|
Element |
signWithKerberosToken(Document doc,
Key key,
String algorithm,
List ids)
Sign with Kerberos Token
|
Element |
signWithSAMLToken(Document doc,
Certificate cert,
String assertionID,
String algorithm,
List ids)
Sign part of the xml document referered by the supplied a list
of id attributes of nodes
|
Element |
signWithSAMLToken(Document doc,
Key key,
boolean symmetricKey,
Certificate signingCert,
Certificate encCert,
String assertionID,
String algorithm,
List ids)
Sign part of the XML document referred by the supplied a list
of id attributes of nodes using SAML Token.
|
Element |
signWithUserNameToken(Document doc,
Certificate cert,
String algorithm,
List ids)
Sign part of the xml document referered by the supplied a list
of id attributes of nodes
|
boolean |
verifyWSSSignature(Document document,
Key key)
Verify web services message signature using specified key
|
boolean |
verifyWSSSignature(Document doc,
Key key,
String certAlias,
String encryptAlias)
Verify web services message signature using specified key
|
boolean |
verifyWSSSignature(Document doc,
String certAlias)
Verify all the signatures of the WSS xml document
|
createDSctx, getAlgorithmURI, getCertificate, getKeyProvider, getPublicKey, getPublicKeybyDSARSAkeyValue, getX509PublicKey, initialize, isValidAlgorithm, signWithWSSSAMLTokenProfile, signWithWSSSAMLTokenProfile, signWithWSSX509TokenProfile, signWithWSSX509TokenProfile, signXML, signXML, signXML, signXML, signXML, signXML, signXML, signXML, signXML, signXML, signXML, signXML, signXML, signXMLUsingKeyPass, verifyXMLSignature, verifyXMLSignature, verifyXMLSignature, verifyXMLSignature, verifyXMLSignature, verifyXMLSignature, verifyXMLSignature, verifyXMLSignature, verifyXMLSignature, verifyXMLSignature, verifyXMLSignature
public WSSSignatureProvider()
public Element signWithSAMLToken(Document doc, Certificate cert, String assertionID, String algorithm, List ids) throws XMLSignatureException
signWithSAMLToken
in interface SignatureProvider
signWithSAMLToken
in class AMSignatureProvider
doc
- XML dom objectcert
- Signer's certificateassertionID
- assertion IDalgorithm
- XML signature algorithmids
- list of id attribute values of nodes to be signedXMLSignatureException
- if the document could not be signedpublic Element signWithSAMLToken(Document doc, Key key, boolean symmetricKey, Certificate signingCert, Certificate encCert, String assertionID, String algorithm, List ids) throws XMLSignatureException
signWithSAMLToken
in interface SignatureProvider
signWithSAMLToken
in class AMSignatureProvider
doc
- XML dom objectkey
- the key that will be used to sign the document.symmetricKey
- true if the supplied key is a symmetric key type.signingCert
- signer's Certificate. If present, this certificate
will be added as part of signature KeyInfo
.encCert
- the certificate if present will be used to encrypt
the symmetric key and replay it as part of KeyInfo
assertionID
- assertion ID for the SAML Security Tokenalgorithm
- XML signature algorithmids
- list of id attribute values of nodes to be signedXMLSignatureException
- if the document could not be signedpublic Element signWithUserNameToken(Document doc, Certificate cert, String algorithm, List ids) throws XMLSignatureException
signWithUserNameToken
in interface SignatureProvider
signWithUserNameToken
in class AMSignatureProvider
doc
- XML dom objectcert
- Signer's certificatealgorithm
- XML signature algorithmids
- list of id attribute values of nodes to be signedXMLSignatureException
- if the document could not be signedpublic Element signWithBinarySecurityToken(Document doc, Certificate cert, String algorithm, List ids, String referenceType) throws XMLSignatureException
signWithBinarySecurityToken
in interface SignatureProvider
signWithBinarySecurityToken
in class AMSignatureProvider
doc
- XML dom objectcert
- Signer's certificatealgorithm
- XML signature algorithmids
- list of id attribute values of nodes to be signedreferenceType
- signed element reference typeXMLSignatureException
- if the document could not be signedpublic boolean verifyWSSSignature(Document doc, String certAlias) throws XMLSignatureException
verifyWSSSignature
in interface SignatureProvider
verifyWSSSignature
in class AMSignatureProvider
doc
- XML dom document whose signature to be verifiedcertAlias
- certAlias alias for Signer's certificate, this is used
to search signer's public certificate if it is not
presented in ds:KeyInfoXMLSignatureException
- if problem occurs during verificationpublic Element signWithKerberosToken(Document doc, Key key, String algorithm, List ids) throws XMLSignatureException
signWithKerberosToken
in interface SignatureProvider
signWithKerberosToken
in class AMSignatureProvider
doc
- key
- algorithm
- ids
- XMLSignatureException
public boolean verifyWSSSignature(Document document, Key key) throws XMLSignatureException
verifyWSSSignature
in interface SignatureProvider
verifyWSSSignature
in class AMSignatureProvider
document
- the document to be validatedkey
- the secret key to be used for validating signatureXMLSignatureException
public boolean verifyWSSSignature(Document doc, Key key, String certAlias, String encryptAlias) throws XMLSignatureException
verifyWSSSignature
in interface SignatureProvider
verifyWSSSignature
in class AMSignatureProvider
doc
- the document to be validatedkey
- the secret key to be used for validating signaturecertAlias
- the certificate alias used for validating the signature
if the key is not available.encryptAlias
- the certificate alias that may be used to decrypt
the symmetric key that is part of KeyInfo
XMLSignatureException
Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.