AuthN | Java SDK | Session Endpoints
Session Endpoints
Invalidate Session | Client
invalidate(String token, String sessionID)Invalidate a session by session ID using a client token.
client.client().session().invalidate(
"ptu_wuk7tvtpswyjtlsx52b7yyi2l7zotv4a",
"pmt_zppkzrjguxyblaia6itbiesejn7jejnr");
List sessions (client token)
list(ClientSessionListRequest request)List sessions using a client token.
ClientSessionListResponse response = client.client().session().list(
new ClientSessionListRequest.Builder("ptu_wuk7tvtpswyjtlsx52b7yyi2l7zotv4a").build());
Log out (client token)
logout(String token)Log out the current user's session.
client.client().session().logout("ptu_wuk7tvtpswyjtlsx52b7yyi2l7zotv4a");
Refresh a Session
refresh(String refreshToken, String userToken)Refresh a session token.
ClientSessionRefreshResponse response = client.client().session().refresh(
"ptr_xpkhwpnz2cmegsws737xbsqnmnuwtbm5",
"ptu_wuk7tvtpswyjtlsx52b7yyi2l7zotv4a");
Invalidate Session
invalidate(String sessionID)Invalidate a session by session ID.
client.session().invalidate("pmt_zppkzrjguxyblaia6itbiesejn7jejnr");
List session (service token)
list(SessionListRequest request)List sessions.
SessionListResponse response = client.session().list(
new SessionListRequest.Builder().build());
Log out (service token)
logout(String userID)Invalidate all sessions belonging to a user.
client.session().logout("pui_xpkhwpnz2cmegsws737xbsqnmnuwtvm5");