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
public final class AuthorizationManagerAfterReactiveMethodInterceptor extends java.lang.Object implements org.springframework.core.Ordered, org.aopalliance.intercept.MethodInterceptor, org.springframework.aop.PointcutAdvisor, org.springframework.aop.framework.AopInfrastructureBean
AMethodInterceptor
which can determine if anAuthentication
has access to the returned object from theMethodInvocation
using the configuredReactiveAuthorizationManager
.- Since:
- 5.8
-
-
Constructor Summary
Constructors Constructor Description AuthorizationManagerAfterReactiveMethodInterceptor(org.springframework.aop.Pointcut pointcut, ReactiveAuthorizationManager<MethodInvocationResult> authorizationManager)
Creates an instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description org.aopalliance.aop.Advice
getAdvice()
int
getOrder()
org.springframework.aop.Pointcut
getPointcut()
java.lang.Object
invoke(org.aopalliance.intercept.MethodInvocation mi)
Determines if anAuthentication
has access to the returned object from theMethodInvocation
using the configuredReactiveAuthorizationManager
.boolean
isPerInstance()
static AuthorizationManagerAfterReactiveMethodInterceptor
postAuthorize()
Creates an instance for thePostAuthorize
annotation.static AuthorizationManagerAfterReactiveMethodInterceptor
postAuthorize(ReactiveAuthorizationManager<MethodInvocationResult> authorizationManager)
Creates an instance for thePostAuthorize
annotation.void
setOrder(int order)
-
-
-
Constructor Detail
-
AuthorizationManagerAfterReactiveMethodInterceptor
public AuthorizationManagerAfterReactiveMethodInterceptor(org.springframework.aop.Pointcut pointcut, ReactiveAuthorizationManager<MethodInvocationResult> authorizationManager)
Creates an instance.- Parameters:
pointcut
- thePointcut
to useauthorizationManager
- theReactiveAuthorizationManager
to use
-
-
Method Detail
-
postAuthorize
public static AuthorizationManagerAfterReactiveMethodInterceptor postAuthorize()
Creates an instance for thePostAuthorize
annotation.- Returns:
- the
AuthorizationManagerAfterReactiveMethodInterceptor
to use
-
postAuthorize
public static AuthorizationManagerAfterReactiveMethodInterceptor postAuthorize(ReactiveAuthorizationManager<MethodInvocationResult> authorizationManager)
Creates an instance for thePostAuthorize
annotation.- Parameters:
authorizationManager
- theReactiveAuthorizationManager
to use- Returns:
- the
AuthorizationManagerAfterReactiveMethodInterceptor
to use
-
invoke
public java.lang.Object invoke(org.aopalliance.intercept.MethodInvocation mi) throws java.lang.Throwable
Determines if anAuthentication
has access to the returned object from theMethodInvocation
using the configuredReactiveAuthorizationManager
.- Specified by:
invoke
in interfaceorg.aopalliance.intercept.MethodInterceptor
- Parameters:
mi
- theMethodInvocation
to use- Returns:
- the
Publisher
from theMethodInvocation
or aPublisher
error if access is denied - Throws:
java.lang.Throwable
-
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
-
getOrder
public int getOrder()
- Specified by:
getOrder
in interfaceorg.springframework.core.Ordered
-
setOrder
public void setOrder(int order)
-
-