Class PreFilterAuthorizationMethodInterceptor
java.lang.Object
org.springframework.security.authorization.method.PreFilterAuthorizationMethodInterceptor
- All Implemented Interfaces:
org.aopalliance.aop.Advice
,org.aopalliance.intercept.Interceptor
,org.aopalliance.intercept.MethodInterceptor
,org.springframework.aop.Advisor
,org.springframework.aop.framework.AopInfrastructureBean
,org.springframework.aop.PointcutAdvisor
,org.springframework.core.Ordered
,AuthorizationAdvisor
public final class PreFilterAuthorizationMethodInterceptor
extends Object
implements AuthorizationAdvisor
A
MethodInterceptor
which filters a method argument by evaluating an expression
from the PreFilter
annotation.- Since:
- 5.6
-
Field Summary
Fields inherited from interface org.springframework.aop.Advisor
EMPTY_ADVICE
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Constructor Summary
ConstructorDescriptionCreates aPreFilterAuthorizationMethodInterceptor
using the provided parameters -
Method Summary
Modifier and TypeMethodDescriptionorg.aopalliance.aop.Advice
int
getOrder()
org.springframework.aop.Pointcut
invoke
(org.aopalliance.intercept.MethodInvocation mi) Filter the method argument specified in thePreFilter
annotation thatMethodInvocation
specifies.boolean
void
setExpressionHandler
(MethodSecurityExpressionHandler expressionHandler) Use thisMethodSecurityExpressionHandler
void
setOrder
(int order) void
Sets theSecurityContextHolderStrategy
to use.void
setTemplateDefaults
(PrePostTemplateDefaults defaults) Configure pre/post-authorization template resolution
-
Constructor Details
-
PreFilterAuthorizationMethodInterceptor
public PreFilterAuthorizationMethodInterceptor()Creates aPreFilterAuthorizationMethodInterceptor
using the provided parameters
-
-
Method Details
-
setExpressionHandler
Use thisMethodSecurityExpressionHandler
- Parameters:
expressionHandler
- theMethodSecurityExpressionHandler
to use
-
setTemplateDefaults
Configure pre/post-authorization template resolutionBy default, this value is
null
, which indicates that templates should not be resolved.- Parameters:
defaults
- - whether to resolve pre/post-authorization templates parameters- Since:
- 6.3
-
getOrder
public int getOrder()- Specified by:
getOrder
in interfaceorg.springframework.core.Ordered
-
setOrder
public void setOrder(int order) -
getPointcut
public org.springframework.aop.Pointcut getPointcut()- Specified by:
getPointcut
in interfaceorg.springframework.aop.PointcutAdvisor
-
getAdvice
public org.aopalliance.aop.Advice getAdvice()- Specified by:
getAdvice
in interfaceorg.springframework.aop.Advisor
-
isPerInstance
public boolean isPerInstance()- Specified by:
isPerInstance
in interfaceorg.springframework.aop.Advisor
-
setSecurityContextHolderStrategy
Sets theSecurityContextHolderStrategy
to use. The default action is to use theSecurityContextHolderStrategy
stored inSecurityContextHolder
.- Since:
- 5.8
-
invoke
Filter the method argument specified in thePreFilter
annotation thatMethodInvocation
specifies.- Specified by:
invoke
in interfaceorg.aopalliance.intercept.MethodInterceptor
- Parameters:
mi
- theMethodInvocation
to check- Throws:
Throwable
-