Class SessionResource
- java.lang.Object
-
- org.keycloak.services.resources.account.SessionResource
-
public class SessionResource extends Object
- Author:
- Pedro Igor
-
-
Constructor Summary
Constructors Constructor Description SessionResource(KeycloakSession session, Auth auth)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<DeviceRepresentation>
devices()
Get device activity information based on the active sessions.javax.ws.rs.core.Response
logout(boolean removeCurrent)
Remove sessionsjavax.ws.rs.core.Response
logout(String id)
Remove a specific sessionStream<SessionRepresentation>
toRepresentation()
Get session information.
-
-
-
Constructor Detail
-
SessionResource
public SessionResource(KeycloakSession session, Auth auth)
-
-
Method Detail
-
toRepresentation
@GET @Produces("application/json") public Stream<SessionRepresentation> toRepresentation()
Get session information.- Returns:
-
devices
@Path("devices") @GET @Produces("application/json") public Collection<DeviceRepresentation> devices()
Get device activity information based on the active sessions.- Returns:
-
logout
@DELETE @Produces("application/json") public javax.ws.rs.core.Response logout(@QueryParam("current") boolean removeCurrent)
Remove sessions- Parameters:
removeCurrent
- remove current session (default is false)- Returns:
-
logout
@Path("/{id}") @DELETE @Produces("application/json") public javax.ws.rs.core.Response logout(@PathParam("id") String id)
Remove a specific session- Parameters:
id
- a specific session to remove- Returns:
-
-