Class ThrowingMethodAuthorizationDeniedHandler
java.lang.Object
org.springframework.security.authorization.method.ThrowingMethodAuthorizationDeniedHandler
- All Implemented Interfaces:
MethodAuthorizationDeniedHandler
public final class ThrowingMethodAuthorizationDeniedHandler
extends Object
implements MethodAuthorizationDeniedHandler
An implementation of
MethodAuthorizationDeniedHandler that throws
AuthorizationDeniedException- Since:
- 6.3
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionhandleDeniedInvocation(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.handleDeniedInvocationResult(MethodInvocationResult methodInvocationResult, AuthorizationResult authorizationResult) Handle denied method invocations, implementations might either throw anAuthorizationDeniedExceptionor a replacement result instead of invoking the method, e.g.
-
Constructor Details
-
ThrowingMethodAuthorizationDeniedHandler
public ThrowingMethodAuthorizationDeniedHandler()
-
-
Method Details
-
handleDeniedInvocation
public 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 interfaceMethodAuthorizationDeniedHandler- Parameters:
methodInvocation- theMethodInvocationrelated to the authorization deniedauthorizationResult- the authorization denied result- Returns:
- a replacement result for the denied method invocation, or null, or a
Monofor reactive applications
-
handleDeniedInvocationResult
public 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 interfaceMethodAuthorizationDeniedHandler- Parameters:
methodInvocationResult- the object containing theMethodInvocationand the result producedauthorizationResult- the authorization denied result- Returns:
- a replacement result for the denied method invocation, or null, or a
Monofor reactive applications
-