SessionClient

interface SessionClient

Session management methods.

Functions

Link copied to clipboard
abstract suspend fun attest(request: ISessionsAttestParameters): SessionsAttestResponse

Attests the current session using a Stytch Trusted Auth Token. Calls the POST /sdk/v1/sessions/attest endpoint.

Link copied to clipboard
abstract suspend fun authenticate(request: ISessionsAuthenticateParameters): SessionsAuthenticateResponse

Validates the current session token against the Stytch backend and optionally extends the session. Calls the POST /sdk/v1/sessions/authenticate endpoint.

Link copied to clipboard
abstract suspend fun revoke(): SessionsRevokeResponse

Revokes the current session, signing the user out on the backend and clearing local session state. Calls the POST /sdk/v1/sessions/revoke endpoint.