Class PostAuthorizeAuthorizationManager
java.lang.Object
org.springframework.security.authorization.method.PostAuthorizeAuthorizationManager
- All Implemented Interfaces:
AuthorizationManager<MethodInvocationResult>
public final class PostAuthorizeAuthorizationManager
extends Object
implements AuthorizationManager<MethodInvocationResult>
An
AuthorizationManager which can determine if an Authentication may
return the result from an invoked MethodInvocation by evaluating an expression
from the PostAuthorize annotation.- Since:
- 5.6
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncheck(Supplier<Authentication> authentication, MethodInvocationResult mi) Determine if anAuthenticationhas access to the returned object by evaluating thePostAuthorizeannotation that theMethodInvocationspecifies.voidsetExpressionHandler(MethodSecurityExpressionHandler expressionHandler) Use this theMethodSecurityExpressionHandler.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.security.authorization.AuthorizationManager
verify
-
Constructor Details
-
PostAuthorizeAuthorizationManager
public PostAuthorizeAuthorizationManager()
-
-
Method Details
-
setExpressionHandler
Use this theMethodSecurityExpressionHandler.- Parameters:
expressionHandler- theMethodSecurityExpressionHandlerto use
-
check
public AuthorizationDecision check(Supplier<Authentication> authentication, MethodInvocationResult mi) Determine if anAuthenticationhas access to the returned object by evaluating thePostAuthorizeannotation that theMethodInvocationspecifies.- Specified by:
checkin interfaceAuthorizationManager<MethodInvocationResult>- Parameters:
authentication- theSupplierof theAuthenticationto checkmi- theMethodInvocationResultto check- Returns:
- an
AuthorizationDecisionornullif thePostAuthorizeannotation is not present
-