Class AuthorizationManagers
java.lang.Object
org.springframework.security.authorization.AuthorizationManagers
A factory class to create an
AuthorizationManager
instances.- Since:
- 5.8
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> AuthorizationManager<T>
allOf
(AuthorizationManager<T>... managers) Creates anAuthorizationManager
that grants access if allAuthorizationManager
s granted or abstained, ifmanagers
are empty then granted decision is returned.static <T> AuthorizationManager<T>
anyOf
(AuthorizationManager<T>... managers) Creates anAuthorizationManager
that grants access if at least oneAuthorizationManager
granted or abstained, ifmanagers
are empty then denied decision is returned.
-
Method Details
-
anyOf
Creates anAuthorizationManager
that grants access if at least oneAuthorizationManager
granted or abstained, ifmanagers
are empty then denied decision is returned.- Type Parameters:
T
- the type of object that is being authorized- Parameters:
managers
- theAuthorizationManager
s to use- Returns:
- the
AuthorizationManager
to use
-
allOf
Creates anAuthorizationManager
that grants access if allAuthorizationManager
s granted or abstained, ifmanagers
are empty then granted decision is returned.- Type Parameters:
T
- the type of object that is being authorized- Parameters:
managers
- theAuthorizationManager
s to use- Returns:
- the
AuthorizationManager
to use
-