Skip to content

Commit f58b3c6

Browse files
chadlwilsonmrin9
authored andcommitted
Correct HTTP basic auth header value
1 parent f92fffe commit f58b3c6

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/templates/security-scheme-template.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ export function applyApiKey(securitySchemeId, username = '', password = '', prov
1616
let finalApiKeyValue = '';
1717
if (securityObj.scheme?.toLowerCase() === 'basic') {
1818
if (username) {
19-
finalApiKeyValue = Buffer.from(`${username}:${password}`, 'utf8').toString('base64');
20-
// finalApiKeyValue = `Basic ${btoa(`${username}:${password}`)}`;
19+
finalApiKeyValue = `Basic ${Buffer.from(`${username}:${password}`, 'utf8').toString('base64')}`;
2120
}
2221
} else if (providedApikeyVal) {
2322
securityObj.value = providedApikeyVal;

0 commit comments

Comments
 (0)