Class AuthorizationManagers
- java.lang.Object
-
- org.springframework.security.authorization.AuthorizationManagers
-
public final class AuthorizationManagers extends java.lang.Object
A factory class to create anAuthorizationManager
instances.- Since:
- 5.8
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <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 Detail
-
anyOf
@SafeVarargs public 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.- Type Parameters:
T
- the type of object that is being authorized- Parameters:
managers
- theAuthorizationManager
s to use- Returns:
- the
AuthorizationManager
to use
-
allOf
@SafeVarargs public static <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.- Type Parameters:
T
- the type of object that is being authorized- Parameters:
managers
- theAuthorizationManager
s to use- Returns:
- the
AuthorizationManager
to use
-
-