Class RealmsAdminResource
- java.lang.Object
-
- org.keycloak.services.resources.admin.RealmsAdminResource
-
public class RealmsAdminResource extends Object
Top level resource for Admin REST API- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
-
Field Summary
Fields Modifier and Type Field Description protected AdminAuth
auth
protected ClientConnection
clientConnection
protected static org.jboss.logging.Logger
logger
static javax.ws.rs.core.CacheControl
noCache
protected KeycloakSession
session
protected TokenManager
tokenManager
-
Constructor Summary
Constructors Constructor Description RealmsAdminResource(KeycloakSession session, AdminAuth auth, TokenManager tokenManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RealmAdminResource
getRealmAdmin(String name)
Base path for the admin REST API for one particular realm.Stream<RealmRepresentation>
getRealms(boolean briefRepresentation)
Get accessible realms Returns a list of accessible realms.javax.ws.rs.core.Response
importRealm(InputStream requestBody)
Import a realm.protected RealmRepresentation
toRealmRep(RealmModel realm, boolean briefRep)
-
-
-
Field Detail
-
logger
protected static final org.jboss.logging.Logger logger
-
auth
protected final AdminAuth auth
-
tokenManager
protected final TokenManager tokenManager
-
session
protected final KeycloakSession session
-
clientConnection
protected final ClientConnection clientConnection
-
noCache
public static final javax.ws.rs.core.CacheControl noCache
-
-
Constructor Detail
-
RealmsAdminResource
public RealmsAdminResource(KeycloakSession session, AdminAuth auth, TokenManager tokenManager)
-
-
Method Detail
-
getRealms
@GET @Produces("application/json") public Stream<RealmRepresentation> getRealms(@DefaultValue("false") @QueryParam("briefRepresentation") boolean briefRepresentation)
Get accessible realms Returns a list of accessible realms. The list is filtered based on what realms the caller is allowed to view.- Returns:
-
toRealmRep
protected RealmRepresentation toRealmRep(RealmModel realm, boolean briefRep)
-
importRealm
@POST @Consumes("application/json") public javax.ws.rs.core.Response importRealm(InputStream requestBody)
Import a realm.Imports a realm from a full representation of that realm. Realm name must be unique.
-
getRealmAdmin
@Path("{realm}") public RealmAdminResource getRealmAdmin(@PathParam("realm") String name)
Base path for the admin REST API for one particular realm.- Parameters:
headers
-name
- realm name (not id!)- Returns:
-
-