Skip to content

Commit dfd9626

Browse files
committed
SWS-796 - Ability to specify SAML properties file in Wss4jInterceptor
1 parent 4296756 commit dfd9626

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

security/src/main/java/org/springframework/ws/soap/security/wss4j/Wss4jSecurityInterceptor.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import javax.security.auth.callback.UnsupportedCallbackException;
2727

2828
import org.springframework.beans.factory.InitializingBean;
29+
import org.springframework.core.io.Resource;
2930
import org.springframework.util.Assert;
3031
import org.springframework.util.CollectionUtils;
3132
import org.springframework.util.StringUtils;
@@ -469,6 +470,14 @@ public void setBspCompliant(boolean bspCompliant) {
469470
this.bspCompliant = bspCompliant;
470471
}
471472

473+
/**
474+
* Sets the location of the SAML properties file.
475+
*/
476+
public void setSamlProperties(Resource location) throws IOException {
477+
Assert.isTrue(location.exists(), "SAML properties file [ " + location + "] does not exist");
478+
handler.setOption(WSHandlerConstants.SAML_PROP_FILE, location.getFile().getAbsolutePath());
479+
}
480+
472481
public void afterPropertiesSet() throws Exception {
473482
Assert.isTrue(validationActions != null || securementActions != null,
474483
"validationActions or securementActions are required");

0 commit comments

Comments
 (0)