Class AggregatePolicyProvider
java.lang.Object
org.keycloak.authorization.policy.provider.aggregated.AggregatePolicyProvider
- All Implemented Interfaces:
PartialEvaluationPolicyProvider,PolicyProvider,Provider
public class AggregatePolicyProvider
extends Object
implements PolicyProvider, PartialEvaluationPolicyProvider
- Author:
- Pedro Igor
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.keycloak.authorization.fgap.evaluation.partial.PartialEvaluationPolicyProvider
PartialEvaluationPolicyProvider.Outcome -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidevaluate(Evaluation evaluation) booleanevaluate(KeycloakSession session, Policy policy, UserModel subject) Evaluate if the givenpolicygrants access to the givensubject.evaluateOutcome(KeycloakSession session, Policy policy, UserModel subject) getPermissions(KeycloakSession session, ResourceType resourceType, ResourceType groupResourceType, UserModel subject) Returns a list ofPolicyinstances representing the permissions that apply to a givensubjectwhen partially evaluating the realm resources that can be accessed.booleanIf partial evaluation is supported for the givenpolicy.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.keycloak.authorization.policy.provider.PolicyProvider
isValid
-
Constructor Details
-
AggregatePolicyProvider
public AggregatePolicyProvider()
-
-
Method Details
-
evaluate
- Specified by:
evaluatein interfacePolicyProvider
-
close
public void close() -
supports
Description copied from interface:PartialEvaluationPolicyProviderIf partial evaluation is supported for the givenpolicy.- Specified by:
supportsin interfacePartialEvaluationPolicyProvider- Parameters:
policy- the policy- Returns:
trueif supported. Otherwise, returnsfalse
-
getPermissions
public Stream<Policy> getPermissions(KeycloakSession session, ResourceType resourceType, ResourceType groupResourceType, UserModel subject) Description copied from interface:PartialEvaluationPolicyProviderReturns a list ofPolicyinstances representing the permissions that apply to a givensubjectwhen partially evaluating the realm resources that can be accessed.- Specified by:
getPermissionsin interfacePartialEvaluationPolicyProvider- Parameters:
session- the sessionresourceType- the type of the resourcesubject- the subject- Returns:
- the permissions that apply to the given
subject
-
evaluate
Description copied from interface:PartialEvaluationPolicyProviderEvaluate if the givenpolicygrants access to the givensubject.- Specified by:
evaluatein interfacePartialEvaluationPolicyProvider- Parameters:
session- the sessionpolicy- the policysubject- the subject- Returns:
trueif access is granted. Otherwise, returnsfalse
-
evaluateOutcome
public PartialEvaluationPolicyProvider.Outcome evaluateOutcome(KeycloakSession session, Policy policy, UserModel subject) - Specified by:
evaluateOutcomein interfacePartialEvaluationPolicyProvider
-