use of org.keycloak.representations.idm.authorization.PolicyRepresentation in project quarkus by quarkusio.
the class KeycloakTestResource method createPermission.
private static void createPermission(ResourceServerRepresentation settings, ResourceRepresentation resource, PolicyRepresentation policy) {
PolicyRepresentation permission = new PolicyRepresentation();
permission.setName(resource.getName() + " Permission");
permission.setType("resource");
permission.setResources(new HashSet<>());
permission.getResources().add(resource.getName());
permission.setPolicies(new HashSet<>());
permission.getPolicies().add(policy.getName());
settings.getPolicies().add(permission);
}
Aggregations