Apache CXF API

org.apache.cxf.rs.security.oauth2.filters
Class OAuthRequestInterceptor

java.lang.Object
  extended by org.apache.cxf.rs.security.oauth2.services.AbstractAccessTokenValidator
      extended by org.apache.cxf.rs.security.oauth2.filters.OAuthRequestFilter
          extended by org.apache.cxf.rs.security.oauth2.filters.OAuthRequestInterceptor
All Implemented Interfaces:
javax.ws.rs.container.ContainerRequestFilter, Interceptor<Message>, PhaseInterceptor<Message>

public class OAuthRequestInterceptor
extends OAuthRequestFilter
implements PhaseInterceptor<Message>


Field Summary
 
Fields inherited from class org.apache.cxf.rs.security.oauth2.services.AbstractAccessTokenValidator
realm, supportedSchemes
 
Constructor Summary
OAuthRequestInterceptor()
           
 
Method Summary
 Collection<PhaseInterceptor<? extends Message>> getAdditionalInterceptors()
          Returns a collection of Interceptors that should be added to the chain whenever this interceptor is added.
 Set<String> getAfter()
          Returns a set containing the IDs of the interceptors that should be executed before this interceptor.
protected  String[] getAuthorizationParts(Message message)
           
 Set<String> getBefore()
          Returns a set containing the IDs of the interceptors that should be executed after this interceptor.
 String getId()
          Returns the ID of this interceptor.
 String getPhase()
          Returns the phase in which this interceptor is excecuted.
 void handleFault(Message message)
          Called for all interceptors (in reverse order) on which handleMessage had been successfully invoked, when normal execution of the chain was aborted for some reason.
 void handleMessage(Message message)
          Intercepts a message.
 
Methods inherited from class org.apache.cxf.rs.security.oauth2.filters.OAuthRequestFilter
checkHttpVerb, checkRequestURI, createSecurityContext, filter, getTokenFromFormData, isCorsRequest, setAudienceIsEndpointAddress, setCheckFormData, setUseUserSubject, validateAudience, validateRequest
 
Methods inherited from class org.apache.cxf.rs.security.oauth2.services.AbstractAccessTokenValidator
findTokenValidator, getAccessTokenValidation, getAudiences, getMessageContext, setAudiences, setDataProvider, setMessageContext, setRealm, setTokenValidator, setTokenValidators
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OAuthRequestInterceptor

public OAuthRequestInterceptor()
Method Detail

handleMessage

public void handleMessage(Message message)
                   throws Fault
Description copied from interface: Interceptor
Intercepts a message. Interceptors should NOT invoke handleMessage or handleFault on the next interceptor - the interceptor chain will take care of this.

Specified by:
handleMessage in interface Interceptor<Message>
Throws:
Fault

getAuthorizationParts

protected String[] getAuthorizationParts(Message message)
Overrides:
getAuthorizationParts in class OAuthRequestFilter

getAdditionalInterceptors

public Collection<PhaseInterceptor<? extends Message>> getAdditionalInterceptors()
Description copied from interface: PhaseInterceptor
Returns a collection of Interceptors that should be added to the chain whenever this interceptor is added. May return null.

Specified by:
getAdditionalInterceptors in interface PhaseInterceptor<Message>
Returns:
the collection of interceptors

getAfter

public Set<String> getAfter()
Description copied from interface: PhaseInterceptor
Returns a set containing the IDs of the interceptors that should be executed before this interceptor. This interceptor will be placed in the chain after the interceptors in the set.

Specified by:
getAfter in interface PhaseInterceptor<Message>
Returns:
the IDs of the interceptors

getBefore

public Set<String> getBefore()
Description copied from interface: PhaseInterceptor
Returns a set containing the IDs of the interceptors that should be executed after this interceptor. This interceptor will be placed in the inteceptor chain before the interceptors in the set.

Specified by:
getBefore in interface PhaseInterceptor<Message>
Returns:
the ids of the interceptors

getId

public String getId()
Description copied from interface: PhaseInterceptor
Returns the ID of this interceptor.

Specified by:
getId in interface PhaseInterceptor<Message>
Returns:
the ID

getPhase

public String getPhase()
Description copied from interface: PhaseInterceptor
Returns the phase in which this interceptor is excecuted.

Specified by:
getPhase in interface PhaseInterceptor<Message>
Returns:
the phase

handleFault

public void handleFault(Message message)
Description copied from interface: Interceptor
Called for all interceptors (in reverse order) on which handleMessage had been successfully invoked, when normal execution of the chain was aborted for some reason.

Specified by:
handleFault in interface Interceptor<Message>

Apache CXF API

Apache CXF