Class AuthorizationManagerAfterReactiveMethodInterceptor
java.lang.Object
org.springframework.security.authorization.method.AuthorizationManagerAfterReactiveMethodInterceptor
- 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 AuthorizationManagerAfterReactiveMethodInterceptor
extends Object
implements AuthorizationAdvisor
A
MethodInterceptor which can determine if an Authentication has access
to the returned object from the MethodInvocation using the configured
ReactiveAuthorizationManager.- Since:
- 5.8
-
Field Summary
Fields inherited from interface org.springframework.aop.Advisor
EMPTY_ADVICEFields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
ConstructorsConstructorDescriptionAuthorizationManagerAfterReactiveMethodInterceptor(org.springframework.aop.Pointcut pointcut, ReactiveAuthorizationManager<MethodInvocationResult> authorizationManager) Creates an instance. -
Method Summary
Modifier and TypeMethodDescriptionorg.aopalliance.aop.AdviceintgetOrder()org.springframework.aop.Pointcutinvoke(org.aopalliance.intercept.MethodInvocation mi) Determines if anAuthenticationhas access to the returned object from theMethodInvocationusing the configuredReactiveAuthorizationManager.booleanCreates an instance for thePostAuthorizeannotation.postAuthorize(ReactiveAuthorizationManager<MethodInvocationResult> authorizationManager) Creates an instance for thePostAuthorizeannotation.voidsetOrder(int order)
-
Constructor Details
-
AuthorizationManagerAfterReactiveMethodInterceptor
public AuthorizationManagerAfterReactiveMethodInterceptor(org.springframework.aop.Pointcut pointcut, ReactiveAuthorizationManager<MethodInvocationResult> authorizationManager) Creates an instance.- Parameters:
pointcut- thePointcutto useauthorizationManager- theReactiveAuthorizationManagerto use
-
-
Method Details
-
postAuthorize
Creates an instance for thePostAuthorizeannotation.- Returns:
- the
AuthorizationManagerAfterReactiveMethodInterceptorto use
-
postAuthorize
public static AuthorizationManagerAfterReactiveMethodInterceptor postAuthorize(ReactiveAuthorizationManager<MethodInvocationResult> authorizationManager) Creates an instance for thePostAuthorizeannotation.- Parameters:
authorizationManager- theReactiveAuthorizationManagerto use- Returns:
- the
AuthorizationManagerAfterReactiveMethodInterceptorto use
-
invoke
Determines if anAuthenticationhas access to the returned object from theMethodInvocationusing the configuredReactiveAuthorizationManager.- Specified by:
invokein interfaceorg.aopalliance.intercept.MethodInterceptor- Parameters:
mi- theMethodInvocationto use- Returns:
- the
Publisherfrom theMethodInvocationor aPublishererror if access is denied - Throws:
Throwable
-
getPointcut
public org.springframework.aop.Pointcut getPointcut()- Specified by:
getPointcutin interfaceorg.springframework.aop.PointcutAdvisor
-
getAdvice
public org.aopalliance.aop.Advice getAdvice()- Specified by:
getAdvicein interfaceorg.springframework.aop.Advisor
-
isPerInstance
public boolean isPerInstance()- Specified by:
isPerInstancein interfaceorg.springframework.aop.Advisor
-
getOrder
public int getOrder()- Specified by:
getOrderin interfaceorg.springframework.core.Ordered
-
setOrder
public void setOrder(int order)
-