Class OAuthRequestInterceptor
java.lang.Object
org.apache.cxf.rs.security.oauth2.services.AbstractAccessTokenValidator
org.apache.cxf.rs.security.oauth2.filters.OAuthRequestFilter
org.apache.cxf.rs.security.oauth2.filters.OAuthRequestInterceptor
- All Implemented Interfaces:
jakarta.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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCollection<PhaseInterceptor<? extends Message>>Returns a collection of Interceptors that should be added to the chain whenever this interceptor is added.getAfter()Returns a set containing the IDs of the interceptors that should be executed before this interceptor.protected String[]getAuthorizationParts(Message message) Returns a set containing the IDs of the interceptors that should be executed after this interceptor.getId()Returns the ID of this interceptor.getPhase()Returns the phase in which this interceptor is excecuted.voidhandleFault(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.voidhandleMessage(Message message) Intercepts a message.Methods inherited from class org.apache.cxf.rs.security.oauth2.filters.OAuthRequestFilter
checkHttpVerb, checkRequestURI, checkScopeProperty, createSecurityContext, filter, getAudience, getTokenFromFormData, isCompleteAudienceMatch, isCorsRequest, setAllPermissionsMatch, setAudience, setAudienceIsEndpointAddress, setBlockPublicClients, setCheckFormData, setCompleteAudienceMatch, setIssuer, setRequiredScopes, setTokenSubjectAuthenticationMethod, setUseUserSubject, validateAudiences, validateRequestMethods inherited from class org.apache.cxf.rs.security.oauth2.services.AbstractAccessTokenValidator
findTokenValidator, getAccessTokenValidation, getJwtTokenConsumer, getMessageContext, isPersistJwtEncoding, removeAccessToken, setDataProvider, setJwtTokenConsumer, setMaxValidationDataCacheSize, setMessageContext, setPersistJwtEncoding, setRealm, setTokenValidator, setTokenValidators
-
Constructor Details
-
OAuthRequestInterceptor
public OAuthRequestInterceptor()
-
-
Method Details
-
handleMessage
Description copied from interface:InterceptorIntercepts a message. Interceptors should NOT invoke handleMessage or handleFault on the next interceptor - the interceptor chain will take care of this.- Specified by:
handleMessagein interfaceInterceptor<Message>- Throws:
Fault
-
getAuthorizationParts
- Overrides:
getAuthorizationPartsin classOAuthRequestFilter
-
getAdditionalInterceptors
Description copied from interface:PhaseInterceptorReturns a collection of Interceptors that should be added to the chain whenever this interceptor is added. May return null.- Specified by:
getAdditionalInterceptorsin interfacePhaseInterceptor<Message>- Returns:
- the collection of interceptors
-
getAfter
Description copied from interface:PhaseInterceptorReturns 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:
getAfterin interfacePhaseInterceptor<Message>- Returns:
- the IDs of the interceptors
-
getBefore
Description copied from interface:PhaseInterceptorReturns 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:
getBeforein interfacePhaseInterceptor<Message>- Returns:
- the ids of the interceptors
-
getId
Description copied from interface:PhaseInterceptorReturns the ID of this interceptor.- Specified by:
getIdin interfacePhaseInterceptor<Message>- Returns:
- the ID
-
getPhase
Description copied from interface:PhaseInterceptorReturns the phase in which this interceptor is excecuted.- Specified by:
getPhasein interfacePhaseInterceptor<Message>- Returns:
- the phase
-
handleFault
Description copied from interface:InterceptorCalled 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:
handleFaultin interfaceInterceptor<Message>
-