我想知道我们是否可以像ws-security.signature.properties
在 WSS4J 拦截器中那样设置 WS-Security 属性。
我正在以这种方式配置 WSS4J 属性,但 WSHandler 需要ws-security.signature.properties
但ws-security.encryption.properties
它找不到它。
Map<String, Object> outProps = new HashMap<String, Object>()
outProps.put(WSHandlerConstants.ACTION,
WSHandlerConstants.TIMESTAMP + " "
+ WSHandlerConstants.SIGNATURE + " "
+ WSHandlerConstants.ENCRYPT);
outProps.put(WSHandlerConstants.USER, "clientKey");
outProps.put(WSHandlerConstants.PASSWORD_TYPE, WSConstants.PW_TEXT);
outProps.put(WSHandlerConstants.PW_CALLBACK_CLASS,
ClientKeystorePasswordCallback.class.getName());
outProps.put(WSHandlerConstants.SIG_PROP_FILE,
"clientWSsec-PC165.properties");
outProps.put(WSHandlerConstants.ENC_PROP_FILE,
"clientWSsec-PC165-Srv.properties");
outProps.put(WSHandlerConstants.SIGNATURE_USER, "clientKey");
outProps.put(WSHandlerConstants.ENCRYPTION_USER, "serverKey");
如何在 WSS4J 拦截器中添加这些属性?
谢谢!