Options
All
  • Public
  • Public/Protected
  • All
Menu

Short Authentication String (SAS) verification.

Hierarchy

  • Sas

Index

Constructors

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(): any
  • 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

  • canBePresented(): boolean
  • Are we in a state where we can show the short auth string?

    Returns boolean

  • cancel(): any
  • 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

  • cancelWithCode(code: string): any
  • 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(): Promise<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>

  • decimals(): undefined | Uint16Array
  • 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

  • emoji(): undefined | Emoji[]
  • 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[]

  • emojiIndex(): undefined | Uint8Array
  • 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

  • free(): void
  • Returns void

  • hasBeenAccepted(): boolean
  • Has the verification been accepted by both parties?

    Returns boolean

  • haveWeConfirmed(): boolean
  • Have we confirmed that the short auth string matches?

    Returns boolean

  • isCancelled(): boolean
  • Is the SAS flow cancelled?

    Returns boolean

  • isDone(): boolean
  • Is the SAS flow done?

    Returns boolean

  • isSelfVerification(): boolean
  • Is this a verification that is verifying one of our own devices?

    Returns boolean

  • registerChangesCallback(callback: Function): void
  • 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

  • startedFromRequest(): boolean
  • Did this verification flow start from a verification request?

    Returns boolean

  • supportsEmoji(): boolean
  • Does this verification flow support displaying emoji for the short authentication string?

    Returns boolean

  • timedOut(): boolean
  • Has the SAS verification flow timed out?

    Returns boolean

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

    Returns boolean

Generated using TypeDoc