Allow to sign SOAP attachments

See gh-107
This commit is contained in:
elfogre
2018-01-02 17:38:37 +01:00
committed by Stéphane Nicoll
parent b4324d26ed
commit 59f3ae0b67

View File

@@ -199,6 +199,8 @@ public class Wss4jSecurityInterceptor extends AbstractWsSecurityInterceptor impl
private CallbackHandler samlCallbackHandler;
private CallbackHandler attachmentCallbackHandler;
// Allow RSA 15 to maintain default behavior
private boolean allowRSA15KeyTransportAlgorithm = true;
@@ -458,6 +460,14 @@ public class Wss4jSecurityInterceptor extends AbstractWsSecurityInterceptor impl
this.samlCallbackHandler = samlCallbackHandler;
}
/**
* Sets the attachment callback handler used for SwA signature/encryption
* @param attachmentCallbackHandler
*/
public void setAttachmentCallbackHandler (CallbackHandler attachmentCallbackHandler) {
this.attachmentCallbackHandler = attachmentCallbackHandler;
}
/**
* Sets the server-side time to live.
*/
@@ -705,6 +715,8 @@ public class Wss4jSecurityInterceptor extends AbstractWsSecurityInterceptor impl
requestData.setWssConfig(this.wssConfig);
requestData.setAttachmentCallbackHandler(attachmentCallbackHandler);
messageContext.setProperty(WSHandlerConstants.TTL_TIMESTAMP, Integer.toString(this.securementTimeToLive));
if (this.samlCallbackHandler != null) {