diff options
author | Florian Dold <florian@dold.me> | 2021-11-04 16:53:04 +0100 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2021-11-04 16:53:11 +0100 |
commit | 6d6679e33849d551b9da07d5058dc09c474c66b7 (patch) | |
tree | 192410793b30057a0c52612f513c007ecabbfacc /packages/anastasis-core/src/reducer-types.ts | |
parent | 83622bd65a0ebd7c22555fb2cfdb542e20d044b9 (diff) | |
download | wallet-core-6d6679e33849d551b9da07d5058dc09c474c66b7.tar.xz |
anastasis-core: support pin-type answers
Diffstat (limited to 'packages/anastasis-core/src/reducer-types.ts')
-rw-r--r-- | packages/anastasis-core/src/reducer-types.ts | 36 |
1 files changed, 34 insertions, 2 deletions
diff --git a/packages/anastasis-core/src/reducer-types.ts b/packages/anastasis-core/src/reducer-types.ts index e0d311e88..19f7d431a 100644 --- a/packages/anastasis-core/src/reducer-types.ts +++ b/packages/anastasis-core/src/reducer-types.ts @@ -312,12 +312,44 @@ export interface ActionArgsSelectChallenge { uuid: string; } -export type ActionArgsSolveChallengeRequest = SolveChallengeAnswerRequest; - +export type ActionArgsSolveChallengeRequest = + | SolveChallengeAnswerRequest + | SolveChallengePinRequest + | SolveChallengeHashRequest; + +/** + * Answer to a challenge. + * + * For "question" challenges, this is a string with the answer. + * + * For "sms" / "email" / "post" this is a numeric code with optionally + * the "A-" prefix. + */ export interface SolveChallengeAnswerRequest { answer: string; } +/** + * Answer to a challenge that requires a numeric response. + * + * XXX: Should be deprecated in favor of just "answer". + */ +export interface SolveChallengePinRequest { + pin: number; +} + +/** + * Answer to a challenge by directly providing the hash. + * + * XXX: When / why is this even used? + */ + export interface SolveChallengeHashRequest { + /** + * Base32-crock encoded hash code. + */ + hash: string; +} + export interface PolicyMember { authentication_method: number; provider: string; |