Package org.infinispan.security
Interface AuthorizationManager
- All Known Implementing Classes:
AuthorizationManagerImpl
,PermissiveAuthorizationManager
public interface AuthorizationManager
The AuthorizationManager is a cache-scoped component which verifies that the
Subject
associated with the current thread, or explicitly specified, has the requested permissions.- Since:
- 7.0
- Author:
- Tristan Tarrant
-
Method Summary
Modifier and TypeMethodDescriptionvoid
checkPermission
(Subject subject, AuthorizationPermission permission) Verifies that theSubject
has the requested permission.void
checkPermission
(Subject subject, AuthorizationPermission permission, String role) Verifies that theSubject
has the requested permission and role.void
checkPermission
(AuthorizationPermission permission) Verifies that theSubject
associated with the current thread has the requested permission.void
checkPermission
(AuthorizationPermission permission, String role) Verifies that theSubject
associated with the current thread has the requested permission and role.void
doIf
(Subject subject, AuthorizationPermission permission, Runnable runnable) Executes the runnable only if the current user has the specified permissiongetPermissions
(Subject subject) Returns the permissions that the specifiedSubject
has for the cacheReturns the permission required to write to the resource associated with this AuthorizationManager.boolean
-
Method Details
-
checkPermission
Verifies that theSubject
associated with the current thread has the requested permission. ASecurityException
is thrown otherwise. -
checkPermission
Verifies that theSubject
has the requested permission. ASecurityException
is thrown otherwise. -
checkPermission
Verifies that theSubject
associated with the current thread has the requested permission and role. ASecurityException
is thrown otherwise. -
checkPermission
Verifies that theSubject
has the requested permission and role. ASecurityException
is thrown otherwise. -
getPermissions
Returns the permissions that the specifiedSubject
has for the cache -
getWritePermission
AuthorizationPermission getWritePermission()Returns the permission required to write to the resource associated with this AuthorizationManager. -
doIf
Executes the runnable only if the current user has the specified permission -
isPermissive
boolean isPermissive()
-