Class AuthorizationManagers
java.lang.Object
org.springframework.security.authorization.AuthorizationManagers
A factory class to create an 
AuthorizationManager instances.- Since:
- 5.8
- 
Method SummaryModifier and TypeMethodDescriptionstatic <T> AuthorizationManager<T>allOf(AuthorizationDecision allAbstainDefaultDecision, AuthorizationManager<T>... managers) Creates anAuthorizationManagerthat grants access if allAuthorizationManagers granted, ifmanagersare empty or abstained, a defaultAuthorizationDecisionis returned.static <T> AuthorizationManager<T>allOf(AuthorizationManager<T>... managers) Creates anAuthorizationManagerthat grants access if allAuthorizationManagers granted or abstained, ifmanagersare empty then granted decision is returned.static <T> AuthorizationManager<T>anyOf(AuthorizationDecision allAbstainDefaultDecision, AuthorizationManager<T>... managers) Creates anAuthorizationManagerthat grants access if at least oneAuthorizationManagergranted, ifmanagersare empty or abstained, a defaultAuthorizationDecisionis returned.static <T> AuthorizationManager<T>anyOf(AuthorizationManager<T>... managers) Creates anAuthorizationManagerthat grants access if at least oneAuthorizationManagergranted or abstained, ifmanagersare empty then denied decision is returned.static <T> AuthorizationManager<T>not(AuthorizationManager<T> manager) Creates anAuthorizationManagerthat reverses whatever decision the givenAuthorizationManagergranted.
- 
Method Details- 
anyOfCreates anAuthorizationManagerthat grants access if at least oneAuthorizationManagergranted or abstained, ifmanagersare empty then denied decision is returned.- Type Parameters:
- T- the type of object that is being authorized
- Parameters:
- managers- the- AuthorizationManagers to use
- Returns:
- the AuthorizationManagerto use
 
- 
anyOf@SafeVarargs public static <T> AuthorizationManager<T> anyOf(AuthorizationDecision allAbstainDefaultDecision, AuthorizationManager<T>... managers) Creates anAuthorizationManagerthat grants access if at least oneAuthorizationManagergranted, ifmanagersare empty or abstained, a defaultAuthorizationDecisionis returned.- Type Parameters:
- T- the type of object that is being authorized
- Parameters:
- allAbstainDefaultDecision- the default decision if all- AuthorizationManagers abstained
- managers- the- AuthorizationManagers to use
- Returns:
- the AuthorizationManagerto use
- Since:
- 6.3
 
- 
allOfCreates anAuthorizationManagerthat grants access if allAuthorizationManagers granted or abstained, ifmanagersare empty then granted decision is returned.- Type Parameters:
- T- the type of object that is being authorized
- Parameters:
- managers- the- AuthorizationManagers to use
- Returns:
- the AuthorizationManagerto use
 
- 
allOf@SafeVarargs public static <T> AuthorizationManager<T> allOf(AuthorizationDecision allAbstainDefaultDecision, AuthorizationManager<T>... managers) Creates anAuthorizationManagerthat grants access if allAuthorizationManagers granted, ifmanagersare empty or abstained, a defaultAuthorizationDecisionis returned.- Type Parameters:
- T- the type of object that is being authorized
- Parameters:
- allAbstainDefaultDecision- the default decision if all- AuthorizationManagers abstained
- managers- the- AuthorizationManagers to use
- Returns:
- the AuthorizationManagerto use
- Since:
- 6.3
 
- 
notCreates anAuthorizationManagerthat reverses whatever decision the givenAuthorizationManagergranted. If the givenAuthorizationManagerabstains, then the returned manager also abstains.- Type Parameters:
- T- the type of object that is being authorized
- Parameters:
- manager- the- AuthorizationManagerto reverse
- Returns:
- the reversing AuthorizationManager
- Since:
- 6.3
 
 
-