Search in sources :

Example 1 with PolicyInputProcessor

use of org.apache.wss4j.policy.stax.enforcer.PolicyInputProcessor in project cxf by apache.

the class PolicyBasedWSS4JStaxInInterceptor method configureSecurityEventListeners.

@Override
protected List<SecurityEventListener> configureSecurityEventListeners(SoapMessage msg, WSSSecurityProperties securityProperties) throws WSSPolicyException {
    final List<SecurityEventListener> securityEventListeners = new ArrayList<>(2);
    securityEventListeners.addAll(super.configureSecurityEventListeners(msg, securityProperties));
    Endpoint endoint = msg.getExchange().getEndpoint();
    PolicyEnforcer policyEnforcer = createPolicyEnforcer(endoint.getEndpointInfo(), msg);
    securityProperties.addInputProcessor(new PolicyInputProcessor(policyEnforcer, securityProperties));
    securityEventListeners.add(policyEnforcer);
    return securityEventListeners;
}
Also used : PolicyInputProcessor(org.apache.wss4j.policy.stax.enforcer.PolicyInputProcessor) Endpoint(org.apache.cxf.endpoint.Endpoint) ArrayList(java.util.ArrayList) PolicyEnforcer(org.apache.wss4j.policy.stax.enforcer.PolicyEnforcer) SecurityEventListener(org.apache.xml.security.stax.securityEvent.SecurityEventListener)

Aggregations

ArrayList (java.util.ArrayList)1 Endpoint (org.apache.cxf.endpoint.Endpoint)1 PolicyEnforcer (org.apache.wss4j.policy.stax.enforcer.PolicyEnforcer)1 PolicyInputProcessor (org.apache.wss4j.policy.stax.enforcer.PolicyInputProcessor)1 SecurityEventListener (org.apache.xml.security.stax.securityEvent.SecurityEventListener)1