use of org.springframework.ws.soap.security.wss4j2.Wss4jSecurityInterceptor in project citrus-samples by christophd.
the class EndpointConfig method wss4jSecurityServerInterceptor.
@Bean
public Wss4jSecurityInterceptor wss4jSecurityServerInterceptor() {
Wss4jSecurityInterceptor interceptor = new Wss4jSecurityInterceptor();
interceptor.setValidationActions("Timestamp UsernameToken");
SimplePasswordValidationCallbackHandler validationCallbackHandler = new SimplePasswordValidationCallbackHandler();
validationCallbackHandler.setUsersMap(Collections.singletonMap("admin", "secret"));
interceptor.setValidationCallbackHandler(validationCallbackHandler);
return interceptor;
}
use of org.springframework.ws.soap.security.wss4j2.Wss4jSecurityInterceptor in project camel by apache.
the class ProducerWss4JSecurityHeaderTest method setRemoveHeaders.
private void setRemoveHeaders(boolean isRemoved) {
ClientInterceptor[] clientInterceptors = webServiceTemplate.getInterceptors();
for (int i = 0; i < clientInterceptors.length; i++) {
if (clientInterceptors[i] instanceof Wss4jSecurityInterceptor) {
Wss4jSecurityInterceptor wss4jSampleInterceptor = (Wss4jSecurityInterceptor) clientInterceptors[i];
wss4jSampleInterceptor.setRemoveSecurityHeader(isRemoved);
}
}
}
use of org.springframework.ws.soap.security.wss4j2.Wss4jSecurityInterceptor in project citrus-samples by christophd.
the class EndpointConfig method wss4jSecurityClientInterceptor.
@Bean
public Wss4jSecurityInterceptor wss4jSecurityClientInterceptor() {
Wss4jSecurityInterceptor interceptor = new Wss4jSecurityInterceptor();
interceptor.setSecurementActions("Timestamp UsernameToken");
interceptor.setSecurementUsername("admin");
interceptor.setSecurementPassword("secret");
return interceptor;
}
Aggregations