AuthN | C# SDK | Session Endpoints
Session Endpoints
Invalidate Session | Client
ClientSession.Invalidate(string, string)Invalidate a session by session ID using a client token.
var response = await client.Client.Session.Invalidate(
"ptu_wuk7tvtpswyjtlsx52b7yyi2l7zotv4a",
"pmt_zppkzrjguxyblaia6itbiesejn7jejnr");
List sessions (client token)
ClientSession.List(ClientSessionListRequest)List sessions using a client token.
var request = new ClientSessionListRequest
.Builder("ptu_wuk7tvtpswyjtlsx52b7yyi2l7zotv4a")
.Build();
var response = await client.Client.Session.List(request);
Log out (client token)
ClientSession.Logout(string)Log out the current user's session.
await client.Client.Session.Logout("ptu_wuk7tvtpswyjtlsx52b7yyi2l7zotv4a");
Refresh a Session
ClientSession.Refresh(ClientSessionRefreshRequest)Refresh a session token.
var request = new ClientSessionRefreshRequest.Builder(
"ptr_xpkhwpnz2cmegsws737xbsqnmnuwtbm5")
.WithUserToken("ptu_wuk7tvtpswyjtlsx52b7yyi2l7zotv4a")
.Build();
var response = await client.Client.Session.Refresh(request);
Invalidate Session
Session.Invalidate(string)Invalidate a session by session ID.
await client.Session.Invalidate("pmt_zppkzrjguxyblaia6itbiesejn7jejnr");
List session (service token)
Session.List(SessionListRequest)List sessions.
var request = new SessionListRequest.Builder().Build();
var response = await client.Session.List(request);
Log out (service token)
Session.Logout(string)Invalidate all sessions belonging to a user.
await client.Session.Logout("pui_xpkhwpnz2cmegsws737xbsqnmnuwtvm5");