This is the primary method of interest to Policy Enforcement Point (PEP) code.
Syntax
boolean
checkAccess
(
String
action
,
SecResource
resource
)
Parameters
-
action –
the operation the caller would like to perform on the resource.
-
resource –
target of the operation.
Returns
true if access is allowed, false if access is denied.
Exceptions
-
IllegalArgumentException –
if there are problems with the input parameters
-
IllegalStateException –
if the configured provider modules do not support the type of access check the caller is trying to perform or if the context has been destroyed.
Usage
It directs an authorization request to the configured PDP (Policy
Decision
Point) in the security context of the authenticated user of the application.
This is a convenience method when the PEP has no environment information to provide to the PDP.
true if access is allowed, false if access is denied.