B2BSessions
interface B2BSessions
The B2BSessions interface provides methods for authenticating, updating, or revoking sessions, and properties to retrieve the existing session token (opaque or JWT).
Types
Link copied to clipboard
Data class used for wrapping parameters used with Sessions authentication
Link copied to clipboard
data class ExchangeParameters(val organizationId: String, val sessionDurationMinutes: UInt, val locale: String? = null)
Data class used for wrapping parameters used with Sessions exchange
Link copied to clipboard
Data class used for wrapping parameters used with Sessions revocation
Functions
Link copied to clipboard
abstract fun authenticate(authParams: B2BSessions.AuthParams, callback: (SessionsAuthenticateResponse) -> Unit)
Authenticates a Session and updates its lifetime by the specified session_duration_minutes. If the session_duration_minutes is not specified, a Session will not be extended
Link copied to clipboard
abstract fun exchange(parameters: B2BSessions.ExchangeParameters, callback: (SessionExchangeResponse) -> Unit)
Exchanges an existing session for one in a different organization
Link copied to clipboard
abstract fun revoke(params: B2BSessions.RevokeParams = RevokeParams(), callback: (BaseResponse) -> Unit)
Revoke a Session and immediately invalidate all its tokens.
Link copied to clipboard
Updates the current session with a sessionToken and sessionJwt