summaryrefslogtreecommitdiff
path: root/packages/anastasis-core/src/recovery-document-types.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/anastasis-core/src/recovery-document-types.ts')
-rw-r--r--packages/anastasis-core/src/recovery-document-types.ts13
1 files changed, 11 insertions, 2 deletions
diff --git a/packages/anastasis-core/src/recovery-document-types.ts b/packages/anastasis-core/src/recovery-document-types.ts
index 74003ccb1..3dc4481ff 100644
--- a/packages/anastasis-core/src/recovery-document-types.ts
+++ b/packages/anastasis-core/src/recovery-document-types.ts
@@ -1,5 +1,14 @@
import { TruthKey, TruthSalt, TruthUuid } from "./crypto.js";
+export enum ChallengeType {
+ Question = "question",
+ Sms = "sms",
+ Email = "email",
+ Post = "post",
+ Totp = "totp",
+ Iban = "iban",
+}
+
export interface RecoveryDocument {
/**
* Human-readable name of the secret
@@ -9,7 +18,7 @@ export interface RecoveryDocument {
/**
* Encrypted core secret.
- *
+ *
* Variable-size length, base32-crock encoded.
*/
encrypted_core_secret: string;
@@ -56,7 +65,7 @@ export interface EscrowMethod {
/**
* Type of the escrow method (e.g. security question, SMS etc.).
*/
- escrow_type: string;
+ escrow_type: ChallengeType;
/**
* UUID of the escrow method.