Short Authentication String (SAS) verification.

Properties

deviceId: DeviceId

Get our own device ID.

flowId: string

Get the unique ID that identifies this SAS verification flow, be either a to-device request ID or a room event ID.

otherDeviceId: DeviceId

Get the device ID of the other side.

otherUserId: UserId

Get the user id of the other side.

roomId: undefined | RoomId

Get the room ID if the verification is happening inside a room.

userId: UserId

Get our own user ID.

Methods

  • Accept the SAS verification.

    This does nothing (and returns undefined) if the verification was already accepted, otherwise it returns an OutgoingRequest that needs to be sent out.

    Returns any

  • Are we in a state where we can show the short auth string?

    Returns boolean

  • Cancel the verification.

    Returns either an OutgoingRequest which should be sent out, or undefined if the verification is already cancelled.

    Returns any

  • Get info about the cancellation if the verification flow has been cancelled.

    Returns undefined | CancelInfo

  • Cancel the verification.

    This cancels the verification with given code (e.g. m.user).

    Returns either an OutgoingRequest which should be sent out, or undefined if the verification is already cancelled.

    Parameters

    • code: string

    Returns any

  • Confirm the SAS verification.

    This confirms that the short auth strings match on both sides.

    Does nothing if we’re not in a state where we can confirm the short auth string.

    Returns a Promise for an array of OutgoingRequests.

    Returns Promise<any>

  • Get the decimal version of the short auth string.

    Returns None if we can’t yet present the short auth string, otherwise a tuple containing three 4-digit integers that represent the short auth string.

    Returns undefined | Uint16Array<ArrayBufferLike>

  • Get the emoji version of the short auth string.

    Returns undefined if we can't yet present the short auth string, otherwise an array of seven Emoji objects.

    Returns undefined | Emoji[]

  • Get the index of the emoji representing the short auth string

    Returns undefined if we can’t yet present the short auth string, otherwise seven u8 numbers in the range from 0 to 63 inclusive which can be converted to an emoji using the relevant specification entry.

    Returns undefined | Uint8Array<ArrayBufferLike>

  • Returns void

  • Has the verification been accepted by both parties?

    Returns boolean

  • Have we confirmed that the short auth string matches?

    Returns boolean

  • Is the SAS flow cancelled?

    Returns boolean

  • Is the SAS flow done?

    Returns boolean

  • Is this a verification that is verifying one of our own devices?

    Returns boolean

  • Register a callback which will be called whenever there is an update to the request.

    The callback is called with no parameters.

    Parameters

    • callback: Function

    Returns void

  • Did this verification flow start from a verification request?

    Returns boolean

  • Does this verification flow support displaying emoji for the short authentication string?

    Returns boolean

  • Has the SAS verification flow timed out?

    Returns boolean

  • True if we initiated the verification flow (ie, we sent the m.key.verification.request).

    Returns boolean