commit e627f65f3cf61428202e47e9e68a5baf4a9abfae
parent dc1fce22778273df6946d3b3efd0eb90b285a8dd
Author: Florian Dold <florian@dold.me>
Date: Fri, 5 Nov 2021 12:50:18 +0100
anastasis-core: towards supporting iban auth
Diffstat:
1 file changed, 14 insertions(+), 0 deletions(-)
diff --git a/packages/anastasis-core/src/index.ts b/packages/anastasis-core/src/index.ts
@@ -930,6 +930,20 @@ async function requestTruth(
};
}
+ if (resp.status === HttpStatusCode.Accepted) {
+ const body = await resp.json();
+ logger.info(`got body ${j2s(body)}`);
+ if (body.method === "iban") {
+ // FIXME:
+ } else {
+ return {
+ code: TalerErrorCode.ANASTASIS_TRUTH_CHALLENGE_FAILED,
+ hint: "unknown external authentication method",
+ http_status: resp.status,
+ } as ReducerStateError;
+ }
+ }
+
return {
code: TalerErrorCode.ANASTASIS_TRUTH_CHALLENGE_FAILED,
hint: "got unexpected /truth/ response status",