Class AuthorizationManagers
- java.lang.Object
-
- org.springframework.security.authorization.AuthorizationManagers
-
public final class AuthorizationManagers extends java.lang.ObjectA factory class to create anAuthorizationManagerinstances.- 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 anAuthorizationManagerthat grants access if allAuthorizationManagers granted or abstained, ifmanagersare empty then granted decision is 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.
-
-
-
Method Detail
-
anyOf
@SafeVarargs public 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.- Type Parameters:
T- the type of object that is being authorized- Parameters:
managers- theAuthorizationManagers to use- Returns:
- the
AuthorizationManagerto use
-
allOf
@SafeVarargs public static <T> AuthorizationManager<T> allOf(AuthorizationManager<T>... managers)
Creates 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- theAuthorizationManagers to use- Returns:
- the
AuthorizationManagerto use
-
-