switch from custom scheme to basic auth for Taler demo bank
This commit is contained in:
parent
0842fab154
commit
2d97d0c37f
@ -51,14 +51,16 @@ export class Bank {
|
|||||||
|
|
||||||
const reqUrl = new URL("api/withdraw-headless-uri", this.bankBaseUrl).href;
|
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({
|
const resp = await Axios({
|
||||||
method: "post",
|
method: "post",
|
||||||
url: reqUrl,
|
url: reqUrl,
|
||||||
data: body,
|
data: body,
|
||||||
responseType: "json",
|
responseType: "json",
|
||||||
headers: {
|
headers: {
|
||||||
"X-Taler-Bank-Username": bankUser.username,
|
"Authorization": `Basic ${authEncoded}`,
|
||||||
"X-Taler-Bank-Password": bankUser.password,
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user