From dfd96260911a0254af27ca1a0f3e4969becf7fdc Mon Sep 17 00:00:00 2001 From: Arjen Poutsma Date: Mon, 3 Dec 2012 14:22:23 +0000 Subject: [PATCH] SWS-796 - Ability to specify SAML properties file in Wss4jInterceptor --- .../ws/soap/security/wss4j/Wss4jSecurityInterceptor.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/security/src/main/java/org/springframework/ws/soap/security/wss4j/Wss4jSecurityInterceptor.java b/security/src/main/java/org/springframework/ws/soap/security/wss4j/Wss4jSecurityInterceptor.java index 97318739..4e6000b7 100755 --- a/security/src/main/java/org/springframework/ws/soap/security/wss4j/Wss4jSecurityInterceptor.java +++ b/security/src/main/java/org/springframework/ws/soap/security/wss4j/Wss4jSecurityInterceptor.java @@ -26,6 +26,7 @@ import javax.security.auth.callback.CallbackHandler; import javax.security.auth.callback.UnsupportedCallbackException; import org.springframework.beans.factory.InitializingBean; +import org.springframework.core.io.Resource; import org.springframework.util.Assert; import org.springframework.util.CollectionUtils; import org.springframework.util.StringUtils; @@ -469,6 +470,14 @@ public class Wss4jSecurityInterceptor extends AbstractWsSecurityInterceptor impl this.bspCompliant = bspCompliant; } + /** + * Sets the location of the SAML properties file. + */ + public void setSamlProperties(Resource location) throws IOException { + Assert.isTrue(location.exists(), "SAML properties file [ " + location + "] does not exist"); + handler.setOption(WSHandlerConstants.SAML_PROP_FILE, location.getFile().getAbsolutePath()); + } + public void afterPropertiesSet() throws Exception { Assert.isTrue(validationActions != null || securementActions != null, "validationActions or securementActions are required");