gpt4 book ai didi

javax.xml.crypto.dsig.spec.XPathFilterParameterSpec类的使用及代码示例

转载 作者:知者 更新时间:2024-03-19 15:30:40 27 4
gpt4 key购买 nike

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

XPathFilterParameterSpec介绍

暂无

代码示例

代码示例来源:origin: stackoverflow.com

new XPathFilterParameterSpec("samlp:AuthnRequest/UserID",
 Collections.singletonMap("samlp", "urn:oasis:names:tc:SAML:2.0:protocol"))

代码示例来源:origin: org.apache.santuario/xmlsec

private static boolean paramsEqual(XPathFilterParameterSpec spec1,
                  XPathFilterParameterSpec spec2)
{
  return spec1.getXPath().equals(spec2.getXPath()) &&
      spec1.getNamespaceMap().equals(spec2.getNamespaceMap());
}

代码示例来源:origin: com.hynnet/xws-security

/**
 *
 * @param algoSpec
 * @param paramList
 */
public void addCanonicalizationParams(AlgorithmParameterSpec algoSpec,HashMap paramList){
  //TODO::FixMe:  Fill this appropriately.
  if(algoSpec instanceof XPathFilterParameterSpec){
    XPathFilterParameterSpec spec = (XPathFilterParameterSpec)algoSpec;
    paramList.put("XPATH",spec.getXPath());
  }else if(algoSpec instanceof XPathFilter2ParameterSpec){
    XPathFilter2ParameterSpec spec = (XPathFilter2ParameterSpec)algoSpec;
    paramList.put("XPATH2",spec.getXPathList());
  }
}

代码示例来源:origin: stackoverflow.com

List<Transform> transforms = new ArrayList<Transform>(2);
Map<String, String> namespaces = new HashMap<String, String>(1);
namespaces.put("soap-env", "http://schemas.xmlsoap.org/soap/envelope/");
XPathFilterParameterSpec paramsXpath = new XPathFilterParameterSpec("/soap-env:Envelope/soap-env:Body", namespaces);
transforms.add(fac.newTransform(Transform.XPATH, (TransformParameterSpec) paramsXpath));

Transform transformObj = fac.newTransform(Transform.ENVELOPED, (TransformParameterSpec) null);
transforms.add(transformObj);

Reference ref = fac.newReference("", digestMethod, transforms, null, null);

代码示例来源:origin: org.apache.santuario/xmlsec

@Override
  public void marshalParams(XMLStructure parent, XMLCryptoContext context)
    throws MarshalException
  {
    super.marshalParams(parent, context);
    XPathFilterParameterSpec xp =
      (XPathFilterParameterSpec)getParameterSpec();
    Element xpathElem = DOMUtils.createElement(ownerDoc, "XPath",
       XMLSignature.XMLNS, DOMUtils.getSignaturePrefix(context));
    xpathElem.appendChild(ownerDoc.createTextNode(xp.getXPath()));

    // add namespace attributes, if necessary
    @SuppressWarnings("unchecked")
    Set<Map.Entry<String, String>> entries =
      xp.getNamespaceMap().entrySet();
    for (Map.Entry<String, String> entry : entries) {
      xpathElem.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:" +
                   entry.getKey(),
                   entry.getValue());
    }

    transformElem.appendChild(xpathElem);
  }
}

代码示例来源:origin: org.apache.santuario/xmlsec

private void unmarshalParams(Element paramsElem) {
  String xPath = paramsElem.getFirstChild().getNodeValue();
  // create a Map of namespace prefixes
  NamedNodeMap attributes = paramsElem.getAttributes();
  if (attributes != null) {
    int length = attributes.getLength();
    Map<String, String> namespaceMap =
      new HashMap<>(length);
    for (int i = 0; i < length; i++) {
      Attr attr = (Attr)attributes.item(i);
      String prefix = attr.getPrefix();
      if (prefix != null && "xmlns".equals(prefix)) {
        namespaceMap.put(attr.getLocalName(), attr.getValue());
      }
    }
    this.params = new XPathFilterParameterSpec(xPath, namespaceMap);
  } else {
    this.params = new XPathFilterParameterSpec(xPath);
  }
}

代码示例来源:origin: com.hynnet/xws-security

private static void fillXPATHTransformParams(Element algoElement , SignatureTarget.Transform transform){
  QName definitionType = getQName(algoElement);
  if (ALGORITHM_PARAMETER_ELEMENT_QNAME.equals(definitionType)) {
    String name = algoElement.getAttribute(NAME_ATTRIBUTE_NAME);
    String value = algoElement.getAttribute(VALUE_ATTRIBUTE_NAME);
    
    if(name.equals("XPATH")){
      transform.setAlgorithmParameters(new XPathFilterParameterSpec(value));
    }else{
      throw new IllegalStateException("XPATH Transform must have XPATH attribute"
          +" name and an XPATH Expression as value");
    }
  }else {
    log.log(
        Level.SEVERE,
        "WSS0513.illegal.configuration.element",
        definitionType.toString());
    throw new IllegalStateException(definitionType +
        " is not a recognized sub-element of Transform");
  }
  return;
}

代码示例来源:origin: es.gob.afirma/afirma-crypto-core-xml

transformParam = new XPathFilterParameterSpec(transformBody, Collections.singletonMap(xmlSignaturePrefix, XMLSignature.XMLNS));

代码示例来源:origin: es.gob.afirma/afirma-crypto-core-xml

params = new XPathFilterParameterSpec(xpathTransformNode.getTextContent());
params = new XPathFilterParameterSpec(
  xpathTransformNode.getTextContent(),
  Collections.singletonMap(

代码示例来源:origin: BaseXdb/basex

if(xRes.getLength() < 1) throw CX_XPINV.get(info, expr);
tfList = new ArrayList<>(2);
tfList.add(fac.newTransform(Transform.XPATH, new XPathFilterParameterSpec(string(expr))));
tfList.add(fac.newTransform(Transform.ENVELOPED, (TransformParameterSpec) null));

代码示例来源:origin: org.basex/basex

if(xRes.getLength() < 1) throw CX_XPINV.get(info, expr);
tfList = new ArrayList<>(2);
tfList.add(fac.newTransform(Transform.XPATH, new XPathFilterParameterSpec(string(expr))));
tfList.add(fac.newTransform(Transform.ENVELOPED, (TransformParameterSpec) null));

代码示例来源:origin: es.gob.afirma/afirma-crypto-xmlsignature

fac.newTransform(
 Transform.XPATH,
 new XPathFilterParameterSpec("not(ancestor-or-self::" + xmlSignaturePrefix + ":Signature)", //$NON-NLS-1$ //$NON-NLS-2$
 Collections.singletonMap(xmlSignaturePrefix, XMLSignature.XMLNS))

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