private void appendToHeader(WSSecHeader secHeader, Element appendingChild) { // TODO this is bit dubious, before migration code was like "dkSig.appendSigToHeader(rmd.getSecHeader())" // but WSS4J has remove append methods. Need to find why ? Element secHeaderElement = secHeader.getSecurityHeader(); secHeaderElement.appendChild(appendingChild); }
/** * Append the EncryptedKey element to the elements already in the Security * header. * * The method can be called any time after <code>prepare()</code>. This * allows to insert the EncryptedKey element at any position in the Security * header. * * @param secHeader The security header that holds the Signature element. */ public void appendToHeader(WSSecHeader secHeader) { Element secHeaderElement = secHeader.getSecurityHeader(); secHeaderElement.appendChild(encryptedKeyElement); }
/** * Append the BinarySecurityToken to the security header. * @param secHeader The security header */ public void appendBSTElementToHeader(WSSecHeader secHeader) { if (bstToken != null && !bstAddedToSecurityHeader) { Element secHeaderElement = secHeader.getSecurityHeader(); secHeaderElement.appendChild(bstToken.getElement()); bstAddedToSecurityHeader = true; } }
/** * Append the BinarySecurityToken to the security header. * @param secHeader The security header */ public void appendBSTElementToHeader(WSSecHeader secHeader) { if (bstToken != null && !bstAddedToSecurityHeader) { Element secHeaderElement = secHeader.getSecurityHeader(); secHeaderElement.appendChild(bstToken.getElement()); bstAddedToSecurityHeader = true; } }
/** * Adds (prepends) the external Reference element to the Security header. * * The reference element <i>must</i> be created by the * <code>encryptForExternalRef() </code> method. The method prepends the * reference element in the SecurityHeader. * * @param dataRef The external <code>enc:Reference</code> element * @param secHeader The security header. */ public void addExternalRefElement(Element dataRef, WSSecHeader secHeader) { WSSecurityUtil.prependChildElement(secHeader.getSecurityHeader(), dataRef); }
public void appendDKElementToHeader(WSSecHeader secHeader) { Element secHeaderElement = secHeader.getSecurityHeader(); secHeaderElement.appendChild(dkt.getElement()); }
/** * Prepend the EncryptedKey element to the elements already in the Security * header. * * The method can be called any time after <code>prepare()</code>. This * allows to insert the EncryptedKey element at any position in the Security * header. * * @param secHeader The security header that holds the Signature element. */ public void prependToHeader(WSSecHeader secHeader) { WSSecurityUtil.prependChildElement(secHeader.getSecurityHeader(), encryptedKeyElement); }
public void appendDKElementToHeader(WSSecHeader secHeader) { Element secHeaderElement = secHeader.getSecurityHeader(); secHeaderElement.appendChild(dkt.getElement()); }
/** * Adds (prepends) the external Reference element to the Security header. * * The reference element <i>must</i> be created by the * <code>encryptForExternalRef() </code> method. The method prepends the * reference element in the SecurityHeader. * * @param dataRef The external <code>enc:Reference</code> element * @param secHeader The security header. */ public void addExternalRefElement(Element dataRef, WSSecHeader secHeader) { WSSecurityUtil.prependChildElement(secHeader.getSecurityHeader(), dataRef); }
/** * Prepend the EncryptedKey element to the elements already in the Security * header. * * The method can be called any time after <code>prepare()</code>. This * allows to insert the EncryptedKey element at any position in the Security * header. * * @param secHeader The security header that holds the Signature element. */ public void prependToHeader(WSSecHeader secHeader) { WSSecurityUtil.prependChildElement(secHeader.getSecurityHeader(), encryptedKeyElement); }
/** * Appends the UsernameToken element to the elements already in the * Security header. * * The method can be called any time after <code>prepare()</code>. * This allows to insert the UsernameToken element at any position in the * Security header. * * @param secHeader The security header that holds the Signature element. */ public void appendToHeader(WSSecHeader secHeader) { Element secHeaderElement = secHeader.getSecurityHeader(); secHeaderElement.appendChild(ut.getElement()); }
public static Element appendChildToSecHeader(RampartMessageData rmd, Element elem) { Element secHeaderElem = rmd.getSecHeader().getSecurityHeader(); Node node = adoptNode(secHeaderElem.getOwnerDocument(), elem); return (Element)secHeaderElem.appendChild(node); }
/** * Prepends the Timestamp element to the elements already in the Security * header. * * The method can be called any time after <code>prepare()</code>. This * allows to insert the Timestamp element at any position in the Security * header. * * @param secHeader The security header that holds the Signature element. */ public void prependToHeader(WSSecHeader secHeader) { WSSecurityUtil.prependChildElement(secHeader.getSecurityHeader(), ts.getElement()); }
/** * Prepends the SignatureConfirmation element to the elements already in the * Security header. * * The method can be called any time after <code>prepare()</code>. * This allows to insert the SignatureConfirmation element at any position in the * Security header. * * @param secHeader The security header that holds the Signature element. */ public void prependToHeader(WSSecHeader secHeader) { WSSecurityUtil.prependChildElement(secHeader.getSecurityHeader(), sc.getElement()); }
public void prependSCTElementToHeader(Document doc, WSSecHeader secHeader) throws WSSecurityException { WSSecurityUtil.prependChildElement(secHeader.getSecurityHeader(), sct.getElement()); }
/** * Prepends the UsernameToken element to the elements already in the * Security header. * * The method can be called any time after <code>prepare()</code>. * This allows to insert the UsernameToken element at any position in the * Security header. * * @param secHeader The security header that holds the Signature element. */ public void prependToHeader(WSSecHeader secHeader) { WSSecurityUtil.prependChildElement(secHeader.getSecurityHeader(), ut.getElement()); }
/** * Prepends the UsernameToken element to the elements already in the * Security header. * * The method can be called any time after <code>prepare()</code>. * This allows to insert the UsernameToken element at any position in the * Security header. * * @param secHeader The security header that holds the Signature element. */ public void prependToHeader(WSSecHeader secHeader) { WSSecurityUtil.prependChildElement(secHeader.getSecurityHeader(), ut.getElement()); }
/** * Prepends the Timestamp element to the elements already in the Security * header. * * The method can be called any time after <code>prepare()</code>. This * allows to insert the Timestamp element at any position in the Security * header. * * @param secHeader The security header that holds the Signature element. */ public void prependToHeader(WSSecHeader secHeader) { WSSecurityUtil.prependChildElement(secHeader.getSecurityHeader(), ts.getElement()); }
public void prependSCTElementToHeader(Document doc, WSSecHeader secHeader) throws WSSecurityException { WSSecurityUtil.prependChildElement(secHeader.getSecurityHeader(), sct.getElement()); }
/** * Prepends the SignatureConfirmation element to the elements already in the * Security header. * * The method can be called any time after <code>prepare()</code>. * This allows to insert the SignatureConfirmation element at any position in the * Security header. * * @param secHeader The security header that holds the Signature element. */ public void prependToHeader(WSSecHeader secHeader) { WSSecurityUtil.prependChildElement(secHeader.getSecurityHeader(), sc.getElement()); }