diff --git a/core/src/main/java/org/keycloak/representations/idm/authorization/PolicyEvaluationResponse.java b/core/src/main/java/org/keycloak/representations/idm/authorization/PolicyEvaluationResponse.java
index 45657713a4..bfa4c30d11 100644
--- a/core/src/main/java/org/keycloak/representations/idm/authorization/PolicyEvaluationResponse.java
+++ b/core/src/main/java/org/keycloak/representations/idm/authorization/PolicyEvaluationResponse.java
@@ -19,13 +19,11 @@
package org.keycloak.representations.idm.authorization;
import org.keycloak.representations.AccessToken;
-import org.keycloak.representations.idm.authorization.DecisionEffect;
-import org.keycloak.representations.idm.authorization.PolicyRepresentation;
-import org.keycloak.representations.idm.authorization.ResourceRepresentation;
-import org.keycloak.representations.idm.authorization.ScopeRepresentation;
import java.util.ArrayList;
+import java.util.HashSet;
import java.util.List;
+import java.util.Set;
/**
* @author Pedro Igor
@@ -123,7 +121,7 @@ public class PolicyEvaluationResponse {
private PolicyRepresentation policy;
private DecisionEffect status;
private List associatedPolicies;
- private List scopes = new ArrayList<>();
+ private Set scopes = new HashSet<>();
public PolicyRepresentation getPolicy() {
return policy;
@@ -162,11 +160,11 @@ public class PolicyEvaluationResponse {
return this.policy.equals(policy.getPolicy());
}
- public void setScopes(List scopes) {
+ public void setScopes(Set scopes) {
this.scopes = scopes;
}
- public List getScopes() {
+ public Set getScopes() {
return scopes;
}
}
diff --git a/services/src/main/java/org/keycloak/authorization/admin/PermissionService.java b/services/src/main/java/org/keycloak/authorization/admin/PermissionService.java
index 4ada87d316..ba4fae255d 100644
--- a/services/src/main/java/org/keycloak/authorization/admin/PermissionService.java
+++ b/services/src/main/java/org/keycloak/authorization/admin/PermissionService.java
@@ -38,6 +38,18 @@ public class PermissionService extends PolicyService {
return new PolicyTypeResourceService(policy, resourceServer, authorization, auth);
}
+ @Override
+ protected PolicyTypeService doCreatePolicyTypeResource(String type) {
+ return new PolicyTypeService(type, resourceServer, authorization, auth) {
+ @Override
+ protected List