Class SingleResultAuthorizationManager<C>
java.lang.Object
org.springframework.security.authorization.SingleResultAuthorizationManager<C>
- All Implemented Interfaces:
AuthorizationManager<C>
public final class SingleResultAuthorizationManager<C>
extends Object
implements AuthorizationManager<C>
An
AuthorizationManager which creates permit-all and deny-all
AuthorizationManager instances.- Since:
- 6.5
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionauthorize(Supplier<? extends @Nullable Authentication> authentication, C object) Determines if access is granted for a specific authentication and object.static <C> SingleResultAuthorizationManager<C>denyAll()static <C> SingleResultAuthorizationManager<C>Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.security.authorization.AuthorizationManager
verify
-
Constructor Details
-
SingleResultAuthorizationManager
-
-
Method Details
-
authorize
public AuthorizationResult authorize(Supplier<? extends @Nullable Authentication> authentication, C object) Description copied from interface:AuthorizationManagerDetermines if access is granted for a specific authentication and object.- Specified by:
authorizein interfaceAuthorizationManager<C>- Parameters:
authentication- theSupplierof theAuthenticationto authorizeobject- theAuthorizationManagerobject to authorize- Returns:
- an
AuthorizationResult
-
denyAll
-
permitAll
-