Skip to content

Commit eca190d

Browse files
korade-krushnaKrishna Korade
and
Krishna Korade
authored
[ BUG #4498] Use Correct Key For Basic Auth and Optional Password (#4501)
Use Correct Key For Basic Auth and Optional pass Co-authored-by: Krishna Korade <[email protected]>
1 parent 0dd6c5b commit eca190d

File tree

1 file changed

+3
-3
lines changed
  • packages/components/nodes/agentflow/HTTP

1 file changed

+3
-3
lines changed

packages/components/nodes/agentflow/HTTP/HTTP.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,14 +220,14 @@ class HTTP_Agentflow implements INode {
220220
// Add credentials if provided
221221
const credentialData = await getCredentialData(nodeData.credential ?? '', options)
222222
if (credentialData && Object.keys(credentialData).length !== 0) {
223-
const basicAuthUsername = getCredentialParam('username', credentialData, nodeData)
224-
const basicAuthPassword = getCredentialParam('password', credentialData, nodeData)
223+
const basicAuthUsername = getCredentialParam('basicAuthUsername', credentialData, nodeData)
224+
const basicAuthPassword = getCredentialParam('basicAuthPassword', credentialData, nodeData)
225225
const bearerToken = getCredentialParam('token', credentialData, nodeData)
226226
const apiKeyName = getCredentialParam('key', credentialData, nodeData)
227227
const apiKeyValue = getCredentialParam('value', credentialData, nodeData)
228228

229229
// Determine which type of auth to use based on available credentials
230-
if (basicAuthUsername && basicAuthPassword) {
230+
if (basicAuthUsername || basicAuthPassword) {
231231
// Basic Auth
232232
const auth = Buffer.from(`${basicAuthUsername}:${basicAuthPassword}`).toString('base64')
233233
requestHeaders['Authorization'] = `Basic ${auth}`

0 commit comments

Comments
 (0)