anastasis-core: towards supporting iban auth

This commit is contained in:
Florian Dold 2021-11-05 12:50:18 +01:00
parent dc1fce2277
commit e627f65f3c
No known key found for this signature in database
GPG Key ID: D2E4F00F29D02A4B

View File

@ -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",