Class ConditionalAuthorizationManager.Builder<T>
java.lang.Object
org.springframework.security.authorization.ConditionalAuthorizationManager.Builder<T>
- Type Parameters:
T- the type of object that the authorization check is being performed on
- Enclosing class:
ConditionalAuthorizationManager<T>
A builder for
ConditionalAuthorizationManager.- Since:
- 7.1
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds theConditionalAuthorizationManager.whenFalse(AuthorizationManager<T> whenFalse) Sets theAuthorizationManagerto use when the condition is false.whenTrue(AuthorizationManager<T> whenTrue) Sets theAuthorizationManagerto use when the condition is true.
-
Method Details
-
whenTrue
Sets theAuthorizationManagerto use when the condition is true.- Parameters:
whenTrue- the manager to use when the condition is true (must not be null)- Returns:
- the builder
-
whenFalse
Sets theAuthorizationManagerto use when the condition is false. Defaults toSingleResultAuthorizationManager.permitAll()if not set.- Parameters:
whenFalse- the manager to use when the condition is false (must not be null)- Returns:
- the builder
-
build
Builds theConditionalAuthorizationManager.- Returns:
- the
ConditionalAuthorizationManager
-