public void setSecurityTokenReference(Element elem) { elementSecurityTokenReference = elem; WSSecurityUtil.prependChildElement(element, elem); }
public void addAttachmentEncryptedDataElements() { if (attachmentEncryptedDataElements != null) { for (int i = 0; i < attachmentEncryptedDataElements.size(); i++) { Element encryptedData = attachmentEncryptedDataElements.get(i); Element securityHeaderElement = getSecurityHeader().getSecurityHeaderElement(); WSSecurityUtil.prependChildElement(securityHeaderElement, encryptedData); } } }
public void addAttachmentEncryptedDataElements() { if (attachmentEncryptedDataElements != null) { for (int i = 0; i < attachmentEncryptedDataElements.size(); i++) { Element encryptedData = attachmentEncryptedDataElements.get(i); Element secHeaderElement = getSecurityHeader().getSecurityHeaderElement(); WSSecurityUtil.prependChildElement(secHeaderElement, encryptedData); } } }
/** * Prepend the SAML elements to the elements already in the Security header. * * The method can be called any time after <code>prepare()</code>. 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 * <code>senderVouches</code>, then the SAML token itself, */ public void prependSAMLElementsToHeader() { Element securityHeaderElement = getSecurityHeader().getSecurityHeaderElement(); if (senderVouches) { WSSecurityUtil.prependChildElement(securityHeaderElement, secRefSaml.getElement()); } WSSecurityUtil.prependChildElement(securityHeaderElement, samlToken); }
/** * 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. */ public void prependToHeader() { Element secHeaderElement = getSecurityHeader().getSecurityHeaderElement(); WSSecurityUtil.prependChildElement(secHeaderElement, encryptedKeyElement); }
public void prependSCTElementToHeader() throws WSSecurityException { Element secHeaderElement = securityHeader.getSecurityHeaderElement(); WSSecurityUtil.prependChildElement(secHeaderElement, sct.getElement()); }
/** * Sets the security token reference of the derived key token * This is the reference to the shared secret used in the conversation/context * * @param ref Security token reference */ public void setSecurityTokenReference(SecurityTokenReference ref) { elementSecurityTokenReference = ref.getElement(); WSSecurityUtil.prependChildElement(element, ref.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 */ public void addExternalRefElement(Element dataRef) { if (dataRef != null) { Element secHeaderElement = getSecurityHeader().getSecurityHeaderElement(); WSSecurityUtil.prependChildElement(secHeaderElement, dataRef); } }
/** * Prepend the BinarySecurityToken to the elements already in the Security * header. * * The method can be called any time after <code>prepare()</code>. * This allows to insert the BST element at any position in the Security * header. */ public void prependBSTElementToHeader() { if (bstToken != null && !bstAddedToSecurityHeader) { Element securityHeaderElement = getSecurityHeader().getSecurityHeaderElement(); WSSecurityUtil.prependChildElement(securityHeaderElement, bstToken); bstAddedToSecurityHeader = true; } }
/** * 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. */ public void prependToHeader() { Element securityHeaderElement = getSecurityHeader().getSecurityHeaderElement(); WSSecurityUtil.prependChildElement(securityHeaderElement, 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. */ public void prependToHeader() { Element securityHeaderElement = getSecurityHeader().getSecurityHeaderElement(); WSSecurityUtil.prependChildElement(securityHeaderElement, 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. */ public void prependToHeader() { Element securityHeaderElement = getSecurityHeader().getSecurityHeaderElement(); WSSecurityUtil.prependChildElement(securityHeaderElement, sc.getElement()); }
/** * Prepend the DerivedKey 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 DerivedKey element at any position in the Security * header. */ public void prependDKElementToHeader() { Element securityHeaderElement = getSecurityHeader().getSecurityHeaderElement(); WSSecurityUtil.prependChildElement(securityHeaderElement, dkt.getElement()); }
/** * Prepend the BinarySecurityToken to the elements already in the Security * header. * * The method can be called any time after <code>prepare()</code>. This * allows to insert the BST element at any position in the Security header. */ public void prependBSTElementToHeader() { if (bstToken != null && !bstAddedToSecurityHeader) { Element secHeaderElement = getSecurityHeader().getSecurityHeaderElement(); WSSecurityUtil.prependChildElement(secHeaderElement, bstToken.getElement()); bstAddedToSecurityHeader = true; } }
header = prependChildElement(envelope, header); header = prependChildElement(envelope, header); foundSecurityHeader = (Element)getDomElement(foundSecurityHeader); return prependChildElement(header, foundSecurityHeader);
/** * Prepends the SAML Assertion to the elements already in the * Security header. * * The method can be called any time after <code>prepare()</code>. * This allows to insert the SAML assertion at any position in the * Security header. * */ public void prependToHeader() { try { Element element = getElement(); if (element != null) { Element securityHeaderElement = getSecurityHeader().getSecurityHeaderElement(); WSSecurityUtil.prependChildElement(securityHeaderElement, element); } } catch (WSSecurityException ex) { throw new RuntimeException(ex.toString(), ex); } }
WSSecurityUtil.prependChildElement(reqData.getSecHeader().getSecurityHeaderElement(), tokenElement);
WSSecurityUtil.prependChildElement(reqData.getSecHeader().getSecurityHeaderElement(), tokenElement);
bstToken.addWSUNamespace(); bstToken.setID(wssConfig.getIdAllocator().createSecureId("X509-", encCert)); WSSecurityUtil.prependChildElement( secHeader.getSecurityHeaderElement(), bstToken.getElement() );
bstToken.addWSUNamespace(); bstToken.setID(wssConfig.getIdAllocator().createSecureId("X509-", encCert)); WSSecurityUtil.prependChildElement( secHeader.getSecurityHeaderElement(), bstToken.getElement() );