Package org.springframework.security.authorization.method

# 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_ADVICE`

### Fields inherited from interface org.springframework.core.Ordered

`HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE`

## Constructor Summary

Constructors
Constructor
Description
`AuthorizationManagerAfterReactiveMethodInterceptor(org.springframework.aop.Pointcut pointcut, ReactiveAuthorizationManager<MethodInvocationResult> authorizationManager)`
Creates an instance.

## Method Summary

Modifier and Type
Method
Description
`org.aopalliance.aop.Advice`
`getAdvice()`
`int`
`getOrder()`
`org.springframework.aop.Pointcut`
`getPointcut()`
`Object`
`invoke(org.aopalliance.intercept.MethodInvocation mi)`
Determines if an `Authentication` has access to the returned object from the `MethodInvocation` using the configured `ReactiveAuthorizationManager`.
`boolean`
`isPerInstance()`
`static AuthorizationManagerAfterReactiveMethodInterceptor`
`postAuthorize()`
Creates an instance for the `PostAuthorize` annotation.
`static AuthorizationManagerAfterReactiveMethodInterceptor`
`postAuthorize(ReactiveAuthorizationManager<MethodInvocationResult> authorizationManager)`
Creates an instance for the `PostAuthorize` annotation.
`void`
`setOrder(int order)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### AuthorizationManagerAfterReactiveMethodInterceptor

public AuthorizationManagerAfterReactiveMethodInterceptor(org.springframework.aop.Pointcut pointcut, ReactiveAuthorizationManager<MethodInvocationResult> authorizationManager)
Creates an instance.

Parameters:
  `pointcut` - the `Pointcut` to use
  `authorizationManager` - the `ReactiveAuthorizationManager` to use

## Method Details

### postAuthorize

public static AuthorizationManagerAfterReactiveMethodInterceptor postAuthorize()
Creates an instance for the `PostAuthorize` annotation.

Returns:
  the `AuthorizationManagerAfterReactiveMethodInterceptor` to use

### postAuthorize

public static AuthorizationManagerAfterReactiveMethodInterceptor postAuthorize(ReactiveAuthorizationManager<MethodInvocationResult> authorizationManager)
Creates an instance for the `PostAuthorize` annotation.

Parameters:
  `authorizationManager` - the `ReactiveAuthorizationManager` to use
Returns:
  the `AuthorizationManagerAfterReactiveMethodInterceptor` to use

### invoke

public Object invoke(org.aopalliance.intercept.MethodInvocation mi) throws Throwable
Determines if an `Authentication` has access to the returned object from the `MethodInvocation` using the configured `ReactiveAuthorizationManager`.

Specified by:
  `invoke` in interface `org.aopalliance.intercept.MethodInterceptor`
Parameters:
  `mi` - the `MethodInvocation` to use
Returns:
  the `Publisher` from the `MethodInvocation` or a `Publisher` error if access is denied
Throws:
  `Throwable`

### getPointcut

public org.springframework.aop.Pointcut getPointcut()

Specified by:
  `getPointcut` in interface `org.springframework.aop.PointcutAdvisor`

### getAdvice

public org.aopalliance.aop.Advice getAdvice()

Specified by:
  `getAdvice` in interface `org.springframework.aop.Advisor`

### isPerInstance

public boolean isPerInstance()

Specified by:
  `isPerInstance` in interface `org.springframework.aop.Advisor`

### getOrder

public int getOrder()

Specified by:
  `getOrder` in interface `org.springframework.core.Ordered`

### setOrder

public void setOrder(int order)