public class SessionResource extends Object
Constructor and Description |
---|
SessionResource(KeycloakSession session,
Auth auth,
org.jboss.resteasy.spi.HttpRequest request) |
Modifier and Type | Method and Description |
---|---|
Collection<DeviceRepresentation> |
devices()
Get device activity information based on the active sessions.
|
javax.ws.rs.core.Response |
logout(boolean removeCurrent)
Remove sessions
|
javax.ws.rs.core.Response |
logout(String id)
Remove a specific session
|
Stream<SessionRepresentation> |
toRepresentation()
Get session information.
|
public SessionResource(KeycloakSession session, Auth auth, org.jboss.resteasy.spi.HttpRequest request)
@GET @Produces(value="application/json") public Stream<SessionRepresentation> toRepresentation()
@Path(value="devices") @GET @Produces(value="application/json") public Collection<DeviceRepresentation> devices()
@DELETE @Produces(value="application/json") public javax.ws.rs.core.Response logout(@QueryParam(value="current") boolean removeCurrent)
removeCurrent
- remove current session (default is false)@Path(value="/{id}") @DELETE @Produces(value="application/json") public javax.ws.rs.core.Response logout(@PathParam(value="id") String id)
id
- a specific session to removeCopyright © 2021 JBoss by Red Hat. All rights reserved.