SWS-796 - Ability to specify SAML properties file in Wss4jInterceptor

This commit is contained in:
Arjen Poutsma
2012-12-03 14:22:23 +00:00
parent 4296756135
commit dfd9626091

View File

@@ -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");