This commit is contained in:
Gregory Schier
2025-01-26 13:13:45 -08:00
committed by GitHub
parent 82b1ad35ff
commit f678593903
99 changed files with 3492 additions and 1583 deletions

View File

@@ -28,7 +28,7 @@ var plugin = {
name: "basic",
label: "Basic Auth",
shortLabel: "Basic",
config: [{
args: [{
type: "text",
name: "username",
label: "Username",
@@ -40,8 +40,8 @@ var plugin = {
optional: true,
password: true
}],
async onApply(_ctx, args) {
const { username, password } = args.config;
async onApply(_ctx, { values }) {
const { username, password } = values;
const value = "Basic " + Buffer.from(`${username}:${password}`).toString("base64");
return { setHeaders: [{ name: "Authorization", value }] };
}