1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-23 17:02:25 +03:00

Add new enum for verification methods. (#4129)

* Define constants for the verification methods.

* Remove some confusing references to the *old* `VerificationMethod`
This commit is contained in:
Richard van der Hoff
2024-03-22 17:17:31 +00:00
committed by GitHub
parent d1259b241c
commit d5a35f8a99
6 changed files with 55 additions and 19 deletions

View File

@@ -25,3 +25,33 @@ export type * from "./@types/media";
export * from "./@types/membership";
export type * from "./@types/event";
export type * from "./@types/state_events";
/** The different methods for device and user verification */
export enum VerificationMethod {
/** Short authentication string (emoji or decimals).
*
* @see https://spec.matrix.org/v1.9/client-server-api/#short-authentication-string-sas-verification
*/
Sas = "m.sas.v1",
/**
* Verification by showing a QR code which is scanned by the other device.
*
* @see https://spec.matrix.org/v1.9/client-server-api/#qr-codes
*/
ShowQrCode = "m.qr_code.show.v1",
/**
* Verification by scanning a QR code that is shown by the other device.
*
* @see https://spec.matrix.org/v1.9/client-server-api/#qr-codes
*/
ScanQrCode = "m.qr_code.scan.v1",
/**
* Verification by confirming that we have scanned a QR code.
*
* @see https://spec.matrix.org/v1.9/client-server-api/#qr-codes
*/
Reciprocate = "m.reciprocate.v1",
}