Class ObservationReactiveAuthorizationManager<T>
java.lang.Object
org.springframework.security.authorization.ObservationReactiveAuthorizationManager<T>
- All Implemented Interfaces:
- MethodAuthorizationDeniedHandler,- ReactiveAuthorizationManager<T>
public final class ObservationReactiveAuthorizationManager<T>
extends Object
implements ReactiveAuthorizationManager<T>, MethodAuthorizationDeniedHandler
An 
ReactiveAuthorizationManager that observes the authentication- Since:
- 6.0
- 
Constructor SummaryConstructorsConstructorDescriptionObservationReactiveAuthorizationManager(io.micrometer.observation.ObservationRegistry registry, ReactiveAuthorizationManager<T> delegate) 
- 
Method SummaryModifier and TypeMethodDescriptionreactor.core.publisher.Mono<AuthorizationResult>authorize(reactor.core.publisher.Mono<Authentication> authentication, T object) Determines if access is granted for a specific authentication and object.@Nullable ObjecthandleDeniedInvocation(org.aopalliance.intercept.MethodInvocation methodInvocation, AuthorizationResult authorizationResult) Handle denied method invocations, implementations might either throw anAuthorizationDeniedExceptionor a replacement result instead of invoking the method, e.g.@Nullable ObjecthandleDeniedInvocationResult(MethodInvocationResult methodInvocationResult, AuthorizationResult authorizationResult) Handle denied method invocations, implementations might either throw anAuthorizationDeniedExceptionor a replacement result instead of invoking the method, e.g.voidsetObservationConvention(io.micrometer.observation.ObservationConvention<AuthorizationObservationContext<?>> convention) Use the provided convention for reporting observation dataMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.security.authorization.ReactiveAuthorizationManagerverify
- 
Constructor Details- 
ObservationReactiveAuthorizationManagerpublic ObservationReactiveAuthorizationManager(io.micrometer.observation.ObservationRegistry registry, ReactiveAuthorizationManager<T> delegate) 
 
- 
- 
Method Details- 
authorizepublic reactor.core.publisher.Mono<AuthorizationResult> authorize(reactor.core.publisher.Mono<Authentication> authentication, T object) Description copied from interface:ReactiveAuthorizationManagerDetermines if access is granted for a specific authentication and object.- Specified by:
- authorizein interface- ReactiveAuthorizationManager<T>
- Parameters:
- authentication- the Authentication to authorize
- object- the object to check
- Returns:
- an decision or empty Mono if no decision could be made.
 
- 
setObservationConventionpublic void setObservationConvention(io.micrometer.observation.ObservationConvention<AuthorizationObservationContext<?>> convention) Use the provided convention for reporting observation data- Parameters:
- convention- The provided convention
- Since:
- 6.1
 
- 
handleDeniedInvocationpublic @Nullable Object handleDeniedInvocation(org.aopalliance.intercept.MethodInvocation methodInvocation, AuthorizationResult authorizationResult) Description copied from interface:MethodAuthorizationDeniedHandlerHandle denied method invocations, implementations might either throw anAuthorizationDeniedExceptionor a replacement result instead of invoking the method, e.g. a masked value.- Specified by:
- handleDeniedInvocationin interface- MethodAuthorizationDeniedHandler
- Parameters:
- methodInvocation- the- MethodInvocationrelated to the authorization denied
- authorizationResult- the authorization denied result
- Returns:
- a replacement result for the denied method invocation, or null, or a
 Monofor reactive applications
 
- 
handleDeniedInvocationResultpublic @Nullable Object handleDeniedInvocationResult(MethodInvocationResult methodInvocationResult, AuthorizationResult authorizationResult) Description copied from interface:MethodAuthorizationDeniedHandlerHandle denied method invocations, implementations might either throw anAuthorizationDeniedExceptionor a replacement result instead of invoking the method, e.g. a masked value. By default, this method invokesMethodAuthorizationDeniedHandler.handleDeniedInvocation(MethodInvocation, AuthorizationResult).- Specified by:
- handleDeniedInvocationResultin interface- MethodAuthorizationDeniedHandler
- Parameters:
- methodInvocationResult- the object containing the- MethodInvocationand the result produced
- authorizationResult- the authorization denied result
- Returns:
- a replacement result for the denied method invocation, or null, or a
 Monofor reactive applications
 
 
-