Class AuthorizationManagerBeforeReactiveMethodInterceptor
- java.lang.Object
-
- org.springframework.security.authorization.method.AuthorizationManagerBeforeReactiveMethodInterceptor
-
- 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 AuthorizationManagerBeforeReactiveMethodInterceptor extends java.lang.Object implements org.springframework.core.Ordered, org.aopalliance.intercept.MethodInterceptor, org.springframework.aop.PointcutAdvisor, org.springframework.aop.framework.AopInfrastructureBeanAMethodInterceptorwhich can determine if anAuthenticationhas access to theMethodInvocationusing the configuredReactiveAuthorizationManager.- Since:
- 5.8
-
-
Constructor Summary
Constructors Constructor Description AuthorizationManagerBeforeReactiveMethodInterceptor(org.springframework.aop.Pointcut pointcut, ReactiveAuthorizationManager<org.aopalliance.intercept.MethodInvocation> authorizationManager)Creates an instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description org.aopalliance.aop.AdvicegetAdvice()intgetOrder()org.springframework.aop.PointcutgetPointcut()java.lang.Objectinvoke(org.aopalliance.intercept.MethodInvocation mi)Determines if anAuthenticationhas access to theMethodInvocationusing the configuredReactiveAuthorizationManager.booleanisPerInstance()static AuthorizationManagerBeforeReactiveMethodInterceptorpreAuthorize()Creates an instance for thePreAuthorizeannotation.static AuthorizationManagerBeforeReactiveMethodInterceptorpreAuthorize(ReactiveAuthorizationManager<org.aopalliance.intercept.MethodInvocation> authorizationManager)Creates an instance for thePreAuthorizeannotation.voidsetOrder(int order)
-
-
-
Constructor Detail
-
AuthorizationManagerBeforeReactiveMethodInterceptor
public AuthorizationManagerBeforeReactiveMethodInterceptor(org.springframework.aop.Pointcut pointcut, ReactiveAuthorizationManager<org.aopalliance.intercept.MethodInvocation> authorizationManager)Creates an instance.- Parameters:
pointcut- thePointcutto useauthorizationManager- theReactiveAuthorizationManagerto use
-
-
Method Detail
-
preAuthorize
public static AuthorizationManagerBeforeReactiveMethodInterceptor preAuthorize()
Creates an instance for thePreAuthorizeannotation.- Returns:
- the
AuthorizationManagerBeforeReactiveMethodInterceptorto use
-
preAuthorize
public static AuthorizationManagerBeforeReactiveMethodInterceptor preAuthorize(ReactiveAuthorizationManager<org.aopalliance.intercept.MethodInvocation> authorizationManager)
Creates an instance for thePreAuthorizeannotation.- Parameters:
authorizationManager- theReactiveAuthorizationManagerto use- Returns:
- the
AuthorizationManagerBeforeReactiveMethodInterceptorto use
-
invoke
public java.lang.Object invoke(org.aopalliance.intercept.MethodInvocation mi) throws java.lang.ThrowableDetermines if anAuthenticationhas access to theMethodInvocationusing the configuredReactiveAuthorizationManager.- Specified by:
invokein interfaceorg.aopalliance.intercept.MethodInterceptor- Parameters:
mi- theMethodInvocationto use- Returns:
- the
Publisherfrom theMethodInvocationor aPublishererror if access is denied - Throws:
java.lang.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)
-
-