public class WSSecSignatureSAML extends WSSecSignature
bstToken, canonAlgo, certUri, document, keyInfo, keyInfoUri, secRef, sig, sigAlgo, signatureValue, strUri, usernameToken, useSingleCert, wsDocInfo| Constructor and Description |
|---|
WSSecSignatureSAML()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addReferencesToSign(java.util.Vector references,
WSSecHeader secHeader)
This method adds references to the Signature.
|
org.w3c.dom.Document |
build(org.w3c.dom.Document doc,
Crypto uCrypto,
org.opensaml.SAMLAssertion assertion,
Crypto iCrypto,
java.lang.String iKeyName,
java.lang.String iKeyPW,
WSSecHeader secHeader)
Builds a signed soap envelope with SAML token.
|
void |
computeSignature()
Compute the Signature over the references.
|
void |
prepare(org.w3c.dom.Document doc,
Crypto uCrypto,
org.opensaml.SAMLAssertion assertion,
Crypto iCrypto,
java.lang.String iKeyName,
java.lang.String iKeyPW,
WSSecHeader secHeader)
Initialize a WSSec SAML Signature.
|
void |
prependSAMLElementsToHeader(WSSecHeader secHeader)
Prepend the SAML elements to the elements already in the Security header.
|
appendBSTElementToHeader, appendToHeader, build, createSTRParameter, getBinarySecurityTokenElement, getBSTTokenId, getDigestAlgo, getId, getInclusivePrefixes, getInclusivePrefixes, getSigCanonicalization, getSignatureAlgorithm, getSignatureElement, getSignatureValue, isUseSingleCertificate, prepare, prependBSTElementToHeader, prependToHeader, setCustomTokenId, setCustomTokenValueType, setDigestAlgo, setEncrKeySha1value, setSecretKey, setSigCanonicalization, setSignatureAlgorithm, setUsernameToken, setUseSingleCertificate, setX509CertificategetKeyIdentifierType, setBodyID, setKeyIdentifierType, setParts, setUserInfo, setWsConfig, setWsuIdpublic org.w3c.dom.Document build(org.w3c.dom.Document doc,
Crypto uCrypto,
org.opensaml.SAMLAssertion assertion,
Crypto iCrypto,
java.lang.String iKeyName,
java.lang.String iKeyPW,
WSSecHeader secHeader)
throws WSSecurityException
wsse:Signaturedoc - The unsigned SOAP envelope as DocumentuCrypto - The user's Crypto instanceassertion - the complete SAML assertioniCrypto - An instance of the Crypto API to handle keystore SAML token
issuer and to generate certificatesiKeyName - Private key to use in case of "sender-Vouches"iKeyPW - Password for issuer private keysecHeader - The Security headerDocumentWSSecurityExceptionpublic void prepare(org.w3c.dom.Document doc,
Crypto uCrypto,
org.opensaml.SAMLAssertion assertion,
Crypto iCrypto,
java.lang.String iKeyName,
java.lang.String iKeyPW,
WSSecHeader secHeader)
throws WSSecurityException
prependSignatureElementToHeader() method.doc - The SOAP envelope as DocumentuCrypto - The user's Crypto instanceassertion - the complete SAML assertioniCrypto - An instance of the Crypto API to handle keystore SAML token
issuer and to generate certificatesiKeyName - Private key to use in case of "sender-Vouches"iKeyPW - Password for issuer private keysecHeader - The Security headerWSSecurityExceptionpublic void prependSAMLElementsToHeader(WSSecHeader secHeader)
prepare(). This
allows to insert the SAML elements at any position in the Security
header.
This methods first prepends the SAML security reference if mode is
senderVouches, then the SAML token itself,secHeader - The security header that holds the BST element.public void addReferencesToSign(java.util.Vector references,
WSSecHeader secHeader)
throws WSSecurityException
computeSignature(). This method can be called several
times to add references as required. addReferencesToSign()
can be called anytime after prepare.addReferencesToSign in class WSSecSignaturereferences - A vector containing WSEncryptionPart objects
that define the parts to sign.secHeader - Used to compute namespaces to be inserted by
InclusiveNamespaces to be WSI compliant.WSSecurityExceptionpublic void computeSignature()
throws WSSecurityException
addReferencesToSign().computeSignature in class WSSecSignatureWSSecurityExceptionCopyright © 2004-2020 The Apache Software Foundation. All Rights Reserved.