public class ClientsResource extends Object
Modifier and Type | Field and Description |
---|---|
protected static org.jboss.logging.Logger |
logger |
protected RealmModel |
realm |
protected KeycloakSession |
session |
Constructor and Description |
---|
ClientsResource(RealmModel realm,
AdminPermissionEvaluator auth,
AdminEventBuilder adminEvent) |
Modifier and Type | Method and 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.
|
List<ClientRepresentation> |
getClients(String clientId,
boolean viewableOnly,
boolean search,
Integer firstResult,
Integer maxResults)
Get clients belonging to the realm
Returns a list of clients belonging to the realm
|
protected static final org.jboss.logging.Logger logger
protected RealmModel realm
@Context protected KeycloakSession session
public ClientsResource(RealmModel realm, AdminPermissionEvaluator auth, AdminEventBuilder adminEvent)
@GET @Produces(value="application/json") public List<ClientRepresentation> getClients(@QueryParam(value="clientId") String clientId, @QueryParam(value="viewableOnly") @DefaultValue(value="false") boolean viewableOnly, @QueryParam(value="search") @DefaultValue(value="false") boolean search, @QueryParam(value="first") Integer firstResult, @QueryParam(value="max") Integer maxResults)
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@POST @Consumes(value="application/json") public javax.ws.rs.core.Response createClient(ClientRepresentation rep)
rep
- @Path(value="{id}") public ClientResource getClient(@PathParam(value="id") String id)
id
- id of client (not client-id)Copyright © 2020 JBoss by Red Hat. All rights reserved.