public class RealmAdminResource extends Object
Modifier and Type | Field and Description |
---|---|
protected RealmAuth |
auth |
protected static org.jboss.logging.Logger |
logger |
protected RealmModel |
realm |
protected KeycloakSession |
session |
protected javax.ws.rs.core.UriInfo |
uriInfo |
Constructor and Description |
---|
RealmAdminResource(RealmAuth auth,
RealmModel realm,
TokenManager tokenManager) |
Modifier and Type | Method and Description |
---|---|
void |
clearEvents()
Delete all events.
|
void |
deleteRealm()
Delete this realm.
|
void |
deleteSession(String sessionId)
Remove a specific user session.
|
ApplicationsResource |
getApplications()
Base path for managing applications under this realm.
|
Map<String,Integer> |
getApplicationSessionStats()
Returns a JSON map.
|
List<Event> |
getEvents(String client,
String type,
String user,
String ipAddress,
Integer firstResult,
Integer maxResults)
Query events.
|
OAuthClientsResource |
getOAuthClients()
base path for managing oauth clients in this realm
|
RealmRepresentation |
getRealm()
Get the top-level representation of the realm.
|
RealmEventsConfigRepresentation |
getRealmEventsConfig()
View the events provider and how it is configured.
|
RoleContainerResource |
getRoleContainerResource()
base path for managing realm-level roles of this realm
|
Map<String,SessionStats> |
getSessionStats()
Any application that has an admin URL will be asked directly how many sessions they have active and what users
are involved with those sessions.
|
void |
logoutAll()
Removes all user sessions.
|
void |
pushRevocation()
Push the realm's revocation policy to any application that has an admin url associated with it.
|
RoleByIdResource |
rolesById()
Path for managing all realm-level or application-level roles defined in this realm by it's id.
|
javax.ws.rs.core.Response |
testLDAPConnection(String action,
String connectionUrl,
String bindDn,
String bindCredential) |
javax.ws.rs.core.Response |
updateRealm(RealmRepresentation rep)
Update the top-level information of this realm.
|
void |
updateRealmEventsConfig(RealmEventsConfigRepresentation rep)
Change the events provider and/or it's configuration
|
UserFederationResource |
userFederation() |
UsersResource |
users()
Base path for managing users in this realm.
|
protected static final org.jboss.logging.Logger logger
protected RealmAuth auth
protected RealmModel realm
@Context protected KeycloakSession session
@Context protected javax.ws.rs.core.UriInfo uriInfo
public RealmAdminResource(RealmAuth auth, RealmModel realm, TokenManager tokenManager)
@Path(value="applications") public ApplicationsResource getApplications()
@Path(value="oauth-clients") public OAuthClientsResource getOAuthClients()
@Path(value="roles") public RoleContainerResource getRoleContainerResource()
@GET @Produces(value="application/json") public RealmRepresentation getRealm()
@PUT @Consumes(value="application/json") public javax.ws.rs.core.Response updateRealm(RealmRepresentation rep)
rep
- @DELETE public void deleteRealm()
@Path(value="users") public UsersResource users()
@Path(value="user-federation") public UserFederationResource userFederation()
@Path(value="roles-by-id") public RoleByIdResource rolesById()
@Path(value="push-revocation") @POST public void pushRevocation()
@Path(value="logout-all") @POST public void logoutAll()
@Path(value="sessions/{session}") @DELETE public void deleteSession(@PathParam(value="session") String sessionId)
sessionId
- @Path(value="application-session-stats") @GET @Produces(value="application/json") public Map<String,Integer> getApplicationSessionStats()
@Path(value="session-stats") @GET @Produces(value="application/json") public Map<String,SessionStats> getSessionStats()
@GET @Path(value="events/config") @Produces(value="application/json") public RealmEventsConfigRepresentation getRealmEventsConfig()
@PUT @Path(value="events/config") @Consumes(value="application/json") public void updateRealmEventsConfig(RealmEventsConfigRepresentation rep)
rep
- @Path(value="events") @GET @Produces(value="application/json") public List<Event> getEvents(@QueryParam(value="client") String client, @QueryParam(value="type") String type, @QueryParam(value="user") String user, @QueryParam(value="ipAddress") String ipAddress, @QueryParam(value="first") Integer firstResult, @QueryParam(value="max") Integer maxResults)
client
- app or oauth client nametype
- type typeuser
- user idipAddress
- firstResult
- maxResults
- @Path(value="events") @DELETE public void clearEvents()
@Path(value="testLDAPConnection") @GET public javax.ws.rs.core.Response testLDAPConnection(@QueryParam(value="action") String action, @QueryParam(value="connectionUrl") String connectionUrl, @QueryParam(value="bindDn") String bindDn, @QueryParam(value="bindCredential") String bindCredential)
Copyright © 2015. All Rights Reserved.