【发布时间】:2016-11-29 12:58:11
【问题描述】:
下面是我需要用 Java 生成的 XML Signature keyinfo。
<ds:KeyInfo Id="idhere">
<wsse:SecurityTokenReference wsse11:TokenType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509PKIPathv1" wsu:Id="idhere" xmlns:wsse11="http://docs.oasis-open.org/wss/oasis-wss-wssecurity-secext-1.1.xsd">
<wsse:Reference URI="#X509" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509PKIPathv1"/>
</wsse:SecurityTokenReference>
</ds:KeyInfo>
以下是到目前为止我在 Java 方面的进展情况。如何将安全令牌引用添加到密钥信息?
KeyInfoFactory kif = fac.getKeyInfoFactory();
KeyInfo ki = kif.newKeyInfo(Collections.singletonList(Whatgoeshere?));
XMLSignature signature = fac.newXMLSignature(si, ki,null,"id-2FC89B275743456788xtdcfyvg9014",null);
任何需要的额外信息随时询问。谢谢!
【问题讨论】:
-
你有没有想过这个问题?
标签: java xml ws-security wss4j