diff options
Diffstat (limited to 'src/headless')
-rw-r--r-- | src/headless/bank.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/headless/bank.ts b/src/headless/bank.ts index 99d7e050b..4a5379280 100644 --- a/src/headless/bank.ts +++ b/src/headless/bank.ts @@ -51,14 +51,16 @@ export class Bank { const reqUrl = new URL("api/withdraw-headless-uri", this.bankBaseUrl).href; + const auth = `${bankUser.username}:${bankUser.password}`; + const authEncoded: string = Buffer.from(auth).toString("base64") + const resp = await Axios({ method: "post", url: reqUrl, data: body, responseType: "json", headers: { - "X-Taler-Bank-Username": bankUser.username, - "X-Taler-Bank-Password": bankUser.password, + "Authorization": `Basic ${authEncoded}`, }, }); |