Class DefaultEvaluation
java.lang.Object
org.keycloak.authorization.policy.evaluation.DefaultEvaluation
- All Implemented Interfaces:
Evaluation
- Author:
- Pedro Igor
-
Constructor Summary
ConstructorDescriptionDefaultEvaluation
(ResourcePermission permission, EvaluationContext executionContext, Decision decision, AuthorizationProvider authorizationProvider) DefaultEvaluation
(ResourcePermission permission, EvaluationContext executionContext, Policy parentPolicy, Decision decision, AuthorizationProvider authorizationProvider, Map<Policy, Map<Object, Decision.Effect>> decisionCache) DefaultEvaluation
(ResourcePermission permission, EvaluationContext executionContext, Policy parentPolicy, Policy policy, Decision decision, AuthorizationProvider authorizationProvider, Map<Policy, Map<Object, Decision.Effect>> decisionCache) -
Method Summary
Modifier and TypeMethodDescriptionvoid
deny()
Denies the requested permission.void
Denies the requested permission if a decision was not made yet.Returns theEvaluationContext
.Returns theResourcePermission
to be evaluated.Returns thePolicy
.getRealm()
Returns aRealm
that can be used by policies to query information.void
grant()
Grants the requested permission to the caller.void
setEffect
(Decision.Effect effect) void
-
Constructor Details
-
DefaultEvaluation
public DefaultEvaluation(ResourcePermission permission, EvaluationContext executionContext, Policy parentPolicy, Decision decision, AuthorizationProvider authorizationProvider, Map<Policy, Map<Object, Decision.Effect>> decisionCache) -
DefaultEvaluation
public DefaultEvaluation(ResourcePermission permission, EvaluationContext executionContext, Decision decision, AuthorizationProvider authorizationProvider) -
DefaultEvaluation
public DefaultEvaluation(ResourcePermission permission, EvaluationContext executionContext, Policy parentPolicy, Policy policy, Decision decision, AuthorizationProvider authorizationProvider, Map<Policy, Map<Object, Decision.Effect>> decisionCache)
-
-
Method Details
-
getPermission
Description copied from interface:Evaluation
Returns theResourcePermission
to be evaluated.- Specified by:
getPermission
in interfaceEvaluation
- Returns:
- the permission to be evaluated
-
getContext
Description copied from interface:Evaluation
Returns theEvaluationContext
. Which provides access to the whole evaluation runtime context.- Specified by:
getContext
in interfaceEvaluation
- Returns:
- the evaluation context
-
grant
public void grant()Description copied from interface:Evaluation
Grants the requested permission to the caller.- Specified by:
grant
in interfaceEvaluation
-
deny
public void deny()Description copied from interface:Evaluation
Denies the requested permission.- Specified by:
deny
in interfaceEvaluation
-
getPolicy
Description copied from interface:Evaluation
Returns thePolicy
. being evaluated.- Specified by:
getPolicy
in interfaceEvaluation
- Returns:
- the evaluation context
-
getRealm
Description copied from interface:Evaluation
Returns aRealm
that can be used by policies to query information.- Specified by:
getRealm
in interfaceEvaluation
- Returns:
- a
Realm
instance
-
getAuthorizationProvider
- Specified by:
getAuthorizationProvider
in interfaceEvaluation
-
getParentPolicy
-
getEffect
-
getDecisionCache
-
denyIfNoEffect
public void denyIfNoEffect()Description copied from interface:Evaluation
Denies the requested permission if a decision was not made yet.- Specified by:
denyIfNoEffect
in interfaceEvaluation
-
setPolicy
-
setEffect
-