AuthSessionsResource

Lists and revokes the signed-in user's sessions.

  • Stable unknown
  • Release candidate since 0.1.0-rc.4
  • Development since 0.1.0-dev.24+fa54770
public final class AuthSessionsResource

Lists and revokes the signed-in user's sessions. Get it from AuthResource.sessions().

Methods

list

public List<JsonNode> list() throws IOException, InterruptedException

Lists the user's sessions (GET /auth/session).

Returns: the sessions; empty when the response is not a list

Throws:

  • IOException: if the request cannot be sent or the response cannot be read
  • InterruptedException: if the thread is interrupted while waiting for the response

revoke

public void revoke(String sessionId) throws IOException, InterruptedException

Revokes a session (DELETE /auth/session/{sessionId}). Revoking current also ends the local session.

Parameters:

  • sessionId: the session ID, or current

Throws:

  • IOException: if the request cannot be sent or the response cannot be read
  • InterruptedException: if the thread is interrupted while waiting for the response

Last updated on

On this page