public class RealmsAdminResource extends Object
Modifier and Type | Field and Description |
---|---|
protected AdminAuth |
auth |
protected KeycloakApplication |
keycloak |
protected static org.jboss.logging.Logger |
logger |
static javax.ws.rs.core.CacheControl |
noCache |
protected KeycloakSession |
session |
protected TokenManager |
tokenManager |
Constructor and Description |
---|
RealmsAdminResource(AdminAuth auth,
TokenManager tokenManager) |
Modifier and Type | Method and Description |
---|---|
protected void |
addRealmRep(List<RealmRepresentation> reps,
RealmModel realm,
ApplicationModel realmManagementApplication) |
RealmAdminResource |
getRealmAdmin(javax.ws.rs.core.HttpHeaders headers,
String name)
Base path for the admin REST API for one particular realm.
|
List<RealmRepresentation> |
getRealms()
Returns a list of realms.
|
javax.ws.rs.core.Response |
importRealm(javax.ws.rs.core.UriInfo uriInfo,
RealmRepresentation rep)
Import a realm from a full representation of that realm.
|
javax.ws.rs.core.Response |
uploadRealm(javax.ws.rs.core.UriInfo uriInfo,
org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataInput input)
Upload a realm from a uploaded JSON file.
|
protected static final org.jboss.logging.Logger logger
protected AdminAuth auth
protected TokenManager tokenManager
public static final javax.ws.rs.core.CacheControl noCache
@Context protected KeycloakSession session
@Context protected KeycloakApplication keycloak
public RealmsAdminResource(AdminAuth auth, TokenManager tokenManager)
@GET @Produces(value="application/json") public List<RealmRepresentation> getRealms()
protected void addRealmRep(List<RealmRepresentation> reps, RealmModel realm, ApplicationModel realmManagementApplication)
@POST @Consumes(value="application/json") public javax.ws.rs.core.Response importRealm(@Context javax.ws.rs.core.UriInfo uriInfo, RealmRepresentation rep)
uriInfo
- rep
- JSON representation@POST @Consumes(value="multipart/form-data") public javax.ws.rs.core.Response uploadRealm(@Context javax.ws.rs.core.UriInfo uriInfo, org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataInput input) throws IOException
uriInfo
- input
- multipart/form dataIOException
@Path(value="{realm}") public RealmAdminResource getRealmAdmin(@Context javax.ws.rs.core.HttpHeaders headers, @PathParam(value="realm") String name)
headers
- name
- realm name (not id!)Copyright © 2015. All Rights Reserved.