Work required to support the JWT plugin

This commit is contained in:
Gregory Schier
2025-01-17 14:36:55 -08:00
parent 153a40cfb1
commit 6ae0bc1ef6
31 changed files with 300 additions and 170 deletions

View File

@@ -42,13 +42,8 @@ var plugin = {
}],
async onApply(_ctx, args) {
const { username, password } = args.config;
return {
url: args.url,
headers: [{
name: "Authorization",
value: "Basic " + Buffer.from(`${username}:${password}`).toString("base64")
}]
};
const value = "Basic " + Buffer.from(`${username}:${password}`).toString("base64");
return { setHeaders: [{ name: "Authorization", value }] };
}
}
};