Class ClientsResource
- java.lang.Object
-
- org.keycloak.services.resources.admin.ClientsResource
-
public class ClientsResource extends Object
Base resource class for managing a realm's clients.- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
-
Field Summary
Fields Modifier and Type Field Description protected static org.jboss.logging.Logger
logger
protected RealmModel
realm
protected KeycloakSession
session
-
Constructor Summary
Constructors Constructor Description ClientsResource(KeycloakSession session, AdminPermissionEvaluator auth, AdminEventBuilder adminEvent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.ws.rs.core.Response
createClient(ClientRepresentation rep)
Create a new client Client's client_id must be unique!ClientResource
getClient(String id)
Base path for managing a specific client.Stream<ClientRepresentation>
getClients(String clientId, boolean viewableOnly, boolean search, String searchQuery, Integer firstResult, Integer maxResults)
Get clients belonging to the realm.
-
-
-
Field Detail
-
logger
protected static final org.jboss.logging.Logger logger
-
realm
protected final RealmModel realm
-
session
protected final KeycloakSession session
-
-
Constructor Detail
-
ClientsResource
public ClientsResource(KeycloakSession session, AdminPermissionEvaluator auth, AdminEventBuilder adminEvent)
-
-
Method Detail
-
getClients
@GET @Produces("application/json") public Stream<ClientRepresentation> getClients(@QueryParam("clientId") String clientId, @QueryParam("viewableOnly") @DefaultValue("false") boolean viewableOnly, @QueryParam("search") @DefaultValue("false") boolean search, @QueryParam("q") String searchQuery, @QueryParam("first") Integer firstResult, @QueryParam("max") Integer maxResults)
Get clients belonging to the realm. If a client can't be retrieved from the storage due to a problem with the underlying storage, it is silently removed from the returned list. This ensures that concurrent modifications to the list don't prevent callers from retrieving this list.- Parameters:
clientId
- filter by clientIdviewableOnly
- filter clients that cannot be viewed in full by adminsearch
- whether this is a search query or a getClientById queryfirstResult
- the first resultmaxResults
- the max results to return
-
createClient
@POST @Consumes("application/json") public javax.ws.rs.core.Response createClient(ClientRepresentation rep)
Create a new client Client's client_id must be unique!- Parameters:
rep
-- Returns:
-
getClient
@Path("{id}") public ClientResource getClient(@PathParam("id") String id)
Base path for managing a specific client.- Parameters:
id
- id of client (not client-id)- Returns:
-
-