AuthN | Python SDK | Session Endpoints
Session Endpoints
Invalidate Session
authn.session.invalidate(session_id)Invalidate a session by session ID.
authn.session.invalidate(
session_id="pmt_zppkzrjguxyblaia6itbiesejn7jejnr",
)
List session (service token)
authn.session.list(filter, last, order, order_by, size)List sessions.
response = authn.session.list()
Log out (service token)
authn.session.logout(user_id)Invalidate all sessions belonging to a user.
authn.session.logout(
user_id="pui_xpkhwpnz2cmegsws737xbsqnmnuwtvm5",
)
Invalidate Session | Client
authn.client.session.invalidate(token, session_id)Invalidate a session by session ID using a client token.
authn.client.session.invalidate(
token="ptu_wuk7tvtpswyjtlsx52b7yyi2l7zotv4a",
session_id="pmt_zppkzrjguxyblaia6itbiesejn7jejnr",
)
List sessions (client token)
authn.client.session.list(token, filter, last, order, order_by, size)List sessions using a client token.
response = authn.client.session.list(
token="ptu_wuk7tvtpswyjtlsx52b7yyi2l7zotv4a",
)
Log out (client token)
authn.client.session.logout(token)Log out the current user's session.
authn.client.session.logout(
token="ptu_wuk7tvtpswyjtlsx52b7yyi2l7zotv4a",
)
Refresh a Session
authn.client.session.refresh(refresh_token, user_token)Refresh a session token.
response = authn.client.session.refresh(
refresh_token="ptr_xpkhwpnz2cmegsws737xbsqnmnuwtbm5",
user_token="ptu_wuk7tvtpswyjtlsx52b7yyi2l7zotv4a",
)