Skip to main content

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.

required parameters

String

A user token value

String

An ID for a token

Response Object

ClientSessionInvalidateResponse

ClientSessionInvalidateResponse

 client.client().session().invalidate(
 	"ptu_wuk7tvtpswyjtlsx52b7yyi2l7zotv4a",
 	"pmt_zppkzrjguxyblaia6itbiesejn7jejnr");

List sessions (client token)

list(ClientSessionListRequest request)

List sessions using a client token.

required parameters

ClientSessionListRequest

Response Object

ClientSessionListResponse

ClientSessionListResponse

 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.

required parameters

String

A user token value

Response Object

ClientSessionLogoutResponse

ClientSessionLogoutResponse

 client.client().session().logout("ptu_wuk7tvtpswyjtlsx52b7yyi2l7zotv4a");

Refresh a Session

refresh(String refreshToken, String userToken)

Refresh a session token.

required parameters

String
String

Response Object

ClientSessionRefreshResponse

ClientSessionRefreshResponse

 ClientSessionRefreshResponse response = client.client().session().refresh(
 	"ptr_xpkhwpnz2cmegsws737xbsqnmnuwtbm5",
 	"ptu_wuk7tvtpswyjtlsx52b7yyi2l7zotv4a");

Invalidate Session

invalidate(String sessionID)

Invalidate a session by session ID.

required parameters

String

An ID for a token

Response Object

SessionInvalidateResponse

SessionInvalidateResponse

 client.session().invalidate("pmt_zppkzrjguxyblaia6itbiesejn7jejnr");

List session (service token)

list(SessionListRequest request)

List sessions.

required parameters

SessionListRequest

Response Object

SessionListResponse

SessionListResponse

 SessionListResponse response = client.session().list(
 	new SessionListRequest.Builder().build());

Log out (service token)

logout(String userID)

Invalidate all sessions belonging to a user.

required parameters

String

The identity of a user or a service

Response Object

SessionLogoutResponse

SessionLogoutResponse

 client.session().logout("pui_xpkhwpnz2cmegsws737xbsqnmnuwtvm5");