Interface AuthorizationManager<T>
-
- Type Parameters:
T
- the type of object that the authorization check is being done one.
- All Known Implementing Classes:
AuthenticatedAuthorizationManager
,AuthorityAuthorizationManager
,Jsr250AuthorizationManager
,PostAuthorizeAuthorizationManager
,PreAuthorizeAuthorizationManager
,RequestMatcherDelegatingAuthorizationManager
,SecuredAuthorizationManager
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface AuthorizationManager<T>
An Authorization manager which can determine if anAuthentication
has access to a specific object.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description AuthorizationDecision
check(java.util.function.Supplier<Authentication> authentication, T object)
Determines if access is granted for a specific authentication and object.default void
verify(java.util.function.Supplier<Authentication> authentication, T object)
Determines if access should be granted for a specific authentication and object.
-
-
-
Method Detail
-
verify
default void verify(java.util.function.Supplier<Authentication> authentication, T object)
Determines if access should be granted for a specific authentication and object.- Parameters:
authentication
- theSupplier
of theAuthentication
to checkobject
- theAuthorizationManager
object to check- Throws:
AccessDeniedException
- if access is not granted
-
check
@Nullable AuthorizationDecision check(java.util.function.Supplier<Authentication> authentication, T object)
Determines if access is granted for a specific authentication and object.- Parameters:
authentication
- theSupplier
of theAuthentication
to checkobject
- theAuthorizationManager
object to check- Returns:
- an
AuthorizationDecision
or null if no decision could be made
-
-