gpt4 book ai didi

org.apache.wss4j.dom.util.WSSecurityUtil.prependChildElement()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-23 20:47:05 26 4
gpt4 key购买 nike

本文整理了Java中org.apache.wss4j.dom.util.WSSecurityUtil.prependChildElement()方法的一些代码示例,展示了WSSecurityUtil.prependChildElement()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WSSecurityUtil.prependChildElement()方法的具体详情如下:
包路径:org.apache.wss4j.dom.util.WSSecurityUtil
类名称:WSSecurityUtil
方法名:prependChildElement

WSSecurityUtil.prependChildElement介绍

[英]prepend a child element
[中]预先添加子元素

代码示例

代码示例来源:origin: org.apache.wss4j/wss4j-ws-security-dom

public void setSecurityTokenReference(Element elem) {
  elementSecurityTokenReference = elem;
  WSSecurityUtil.prependChildElement(element, elem);
}

代码示例来源:origin: org.apache.wss4j/wss4j-ws-security-dom

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);
    }
  }
}

代码示例来源:origin: org.apache.wss4j/wss4j-ws-security-dom

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);
    }
  }
}

代码示例来源:origin: org.apache.wss4j/wss4j-ws-security-dom

/**
 * 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);
}

代码示例来源:origin: org.apache.wss4j/wss4j-ws-security-dom

/**
 * 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);
}

代码示例来源:origin: org.apache.wss4j/wss4j-ws-security-dom

public void prependSCTElementToHeader()
  throws WSSecurityException {
  Element secHeaderElement = securityHeader.getSecurityHeaderElement();
  WSSecurityUtil.prependChildElement(secHeaderElement, sct.getElement());
}

代码示例来源:origin: org.apache.wss4j/wss4j-ws-security-dom

/**
 * 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());
}

代码示例来源:origin: org.apache.wss4j/wss4j-ws-security-dom

/**
 * 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);
  }
}

代码示例来源:origin: org.apache.wss4j/wss4j-ws-security-dom

/**
 * 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;
  }
}

代码示例来源:origin: org.apache.wss4j/wss4j-ws-security-dom

/**
 * 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());
}

代码示例来源:origin: org.apache.wss4j/wss4j-ws-security-dom

/**
 * 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());
}

代码示例来源:origin: org.apache.wss4j/wss4j-ws-security-dom

/**
 * 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());
}

代码示例来源:origin: org.apache.wss4j/wss4j-ws-security-dom

/**
 * 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());
}

代码示例来源:origin: org.apache.wss4j/wss4j-ws-security-dom

/**
 * 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;
  }
}

代码示例来源:origin: org.apache.wss4j/wss4j-ws-security-dom

header = prependChildElement(envelope, header);
    header = prependChildElement(envelope, header);
foundSecurityHeader = (Element)getDomElement(foundSecurityHeader);
return prependChildElement(header, foundSecurityHeader);

代码示例来源:origin: org.apache.wss4j/wss4j-ws-security-dom

/**
 * 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);
  }
}

代码示例来源:origin: org.apache.wss4j/wss4j-ws-security-dom

WSSecurityUtil.prependChildElement(reqData.getSecHeader().getSecurityHeaderElement(), tokenElement);

代码示例来源:origin: org.apache.wss4j/wss4j-ws-security-dom

WSSecurityUtil.prependChildElement(reqData.getSecHeader().getSecurityHeaderElement(), tokenElement);

代码示例来源:origin: org.apache.cxf/cxf-rt-ws-security

bstToken.addWSUNamespace();
bstToken.setID(wssConfig.getIdAllocator().createSecureId("X509-", encCert));
WSSecurityUtil.prependChildElement(
  secHeader.getSecurityHeaderElement(), bstToken.getElement()
);

代码示例来源:origin: apache/cxf

bstToken.addWSUNamespace();
bstToken.setID(wssConfig.getIdAllocator().createSecureId("X509-", encCert));
WSSecurityUtil.prependChildElement(
  secHeader.getSecurityHeaderElement(), bstToken.getElement()
);

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com