Search in sources :

Example 1 with SimplePasswordValidationCallbackHandler

use of org.springframework.ws.soap.security.wss4j2.callback.SimplePasswordValidationCallbackHandler 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;
}
Also used : Wss4jSecurityInterceptor(org.springframework.ws.soap.security.wss4j2.Wss4jSecurityInterceptor) SimplePasswordValidationCallbackHandler(org.springframework.ws.soap.security.wss4j2.callback.SimplePasswordValidationCallbackHandler) Bean(org.springframework.context.annotation.Bean)

Aggregations

Bean (org.springframework.context.annotation.Bean)1 Wss4jSecurityInterceptor (org.springframework.ws.soap.security.wss4j2.Wss4jSecurityInterceptor)1 SimplePasswordValidationCallbackHandler (org.springframework.ws.soap.security.wss4j2.callback.SimplePasswordValidationCallbackHandler)1