Class PostAuthorizeAuthorizationManager
- java.lang.Object
-
- org.springframework.security.authorization.method.PostAuthorizeAuthorizationManager
-
- All Implemented Interfaces:
AuthorizationManager<MethodInvocationResult>
public final class PostAuthorizeAuthorizationManager extends java.lang.Object implements AuthorizationManager<MethodInvocationResult>
AnAuthorizationManagerwhich can determine if anAuthenticationmay return the result from an invokedMethodInvocationby evaluating an expression from thePostAuthorizeannotation.- Since:
- 5.6
-
-
Constructor Summary
Constructors Constructor Description PostAuthorizeAuthorizationManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AuthorizationDecisioncheck(java.util.function.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, wait
-
Methods inherited from interface org.springframework.security.authorization.AuthorizationManager
verify
-
-
-
-
Method Detail
-
setExpressionHandler
public void setExpressionHandler(MethodSecurityExpressionHandler expressionHandler)
Use this theMethodSecurityExpressionHandler.- Parameters:
expressionHandler- theMethodSecurityExpressionHandlerto use
-
check
public AuthorizationDecision check(java.util.function.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
-
-