Class OrganizationGroupResource

java.lang.Object
org.keycloak.organization.admin.resource.OrganizationGroupResource

public class OrganizationGroupResource extends Object
  • Constructor Details

    • OrganizationGroupResource

      public OrganizationGroupResource(org.keycloak.models.KeycloakSession session, org.keycloak.organization.OrganizationProvider organizationProvider, org.keycloak.models.OrganizationModel organization, org.keycloak.models.GroupModel group, AdminEventBuilder adminEvent, AdminPermissionEvaluator auth)
  • Method Details

    • getGroup

      @GET @Produces("application/json") public org.keycloak.representations.idm.GroupRepresentation getGroup(@QueryParam("subGroupsCount") @DefaultValue("false") boolean subGroupsCount)
      Precondition: caller must have passed through OrganizationsResource.get(String) which enforces auth.orgs().requireView(organization), and then through OrganizationGroupsResource.getGroupById(String) which enforces the same check.
    • getRoleMappings

      @Path("role-mappings") public RoleMapperResource getRoleMappings()
    • deleteGroup

      @DELETE public void deleteGroup()
    • updateGroup

      @PUT @Consumes("application/json") public jakarta.ws.rs.core.Response updateGroup(org.keycloak.representations.idm.GroupRepresentation rep)
    • getSubGroups

      @GET @Path("children") @Produces("application/json") public Stream<org.keycloak.representations.idm.GroupRepresentation> getSubGroups(@QueryParam("search") String search, @QueryParam("exact") Boolean exact, @QueryParam("first") @DefaultValue("0") Integer first, @QueryParam("max") @DefaultValue("10") Integer max, @QueryParam("subGroupsCount") boolean subGroupsCount)
      Precondition: caller must have passed through OrganizationsResource.get(String) which enforces auth.orgs().requireView(organization), and then through OrganizationGroupsResource.getGroupById(String) which enforces the same check.
    • addSubGroup

      @POST @Path("children") @Produces("application/json") @Consumes("application/json") public jakarta.ws.rs.core.Response addSubGroup(org.keycloak.representations.idm.GroupRepresentation rep)
    • getMembers

      @GET @Path("members") @Produces("application/json") public Stream<org.keycloak.representations.idm.MemberRepresentation> getMembers(@QueryParam("first") Integer firstResult, @QueryParam("max") Integer maxResults, @QueryParam("briefRepresentation") Boolean briefRepresentation)
      Precondition: caller must have passed through OrganizationsResource.get(String) which enforces auth.orgs().requireView(organization), and then through OrganizationGroupsResource.getGroupById(String) which enforces the same check. This method additionally requires auth.users().requireQuery().
    • joinGroup

      @PUT @Path("members/{userId}") public void joinGroup(@PathParam("userId") String userId)
    • leaveGroup

      @DELETE @Path("members/{userId}") public void leaveGroup(@PathParam("userId") String userId)