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.ts15
1 files changed, 12 insertions, 3 deletions
diff --git a/packages/anastasis-core/src/recovery-document-types.ts b/packages/anastasis-core/src/recovery-document-types.ts
index 74003ccb1..f94aa1916 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.
@@ -73,7 +82,7 @@ export interface EscrowMethod {
/**
* Salt to hash the security question answer if applicable.
*/
- truth_salt: TruthSalt;
+ question_salt: TruthSalt;
// Salt from the provider to derive the user ID
// at this provider.