org.jboss.fuse.examples.cxf.jaxws.security.client
Class CustomSecurityInterceptor

java.lang.Object
  extended by org.apache.cxf.phase.AbstractPhaseInterceptor<org.apache.cxf.message.Message>
      extended by org.jboss.fuse.examples.cxf.jaxws.security.client.CustomSecurityInterceptor
All Implemented Interfaces:
org.apache.cxf.interceptor.Interceptor<org.apache.cxf.message.Message>, org.apache.cxf.phase.PhaseInterceptor<org.apache.cxf.message.Message>

public class CustomSecurityInterceptor
extends org.apache.cxf.phase.AbstractPhaseInterceptor<org.apache.cxf.message.Message>

CXF Interceptors are a very powerful and flexible mechanism to add custom logic to the default CXF processing, both when using CXF on the client side and on the server side. With this custom security interceptor, we will configure the default WSS4J interceptor in the client to provide the required credentials to perform our web service invocation.


Constructor Summary
CustomSecurityInterceptor()
          Configuring the interceptor to be used in the 'setup' phase.
 
Method Summary
 void handleMessage(org.apache.cxf.message.Message message)
          This is the actual implementation for our interceptor - we define the necessary properties for doing the authentication and then iterate over the rest of the interceptor chain to find the WSS4J interceptor and configure it properly.
 
Methods inherited from class org.apache.cxf.phase.AbstractPhaseInterceptor
addAfter, addAfter, addBefore, addBefore, getAdditionalInterceptors, getAfter, getBefore, getId, getPhase, handleFault, isGET, isRequestor, setAfter, setBefore
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CustomSecurityInterceptor

public CustomSecurityInterceptor()
Configuring the interceptor to be used in the 'setup' phase.

Method Detail

handleMessage

public void handleMessage(org.apache.cxf.message.Message message)
                   throws org.apache.cxf.interceptor.Fault
This is the actual implementation for our interceptor - we define the necessary properties for doing the authentication and then iterate over the rest of the interceptor chain to find the WSS4J interceptor and configure it properly.

Throws:
org.apache.cxf.interceptor.Fault


Copyright © 2013 Red Hat. All Rights Reserved.