Exemplo n.º 1
0
  @GET
  @Path("group-by-path/{path: .*}")
  @NoCache
  @Produces(MediaType.APPLICATION_JSON)
  public GroupRepresentation getGroupByPath(@PathParam("path") String path) {
    auth.requireView();

    GroupModel found = KeycloakModelUtils.findGroupByPath(realm, path);
    if (found == null) {
      throw new NotFoundException("Group path does not exist");
    }
    return ModelToRepresentation.toGroupHierarchy(found, true);
  }