mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
fix(HTTP Request Node): Fix sending previously selected credentials also on V2 (#4457)
This commit is contained in:
@@ -627,24 +627,33 @@ export class HttpRequestV2 implements INodeType {
|
|||||||
let nodeCredentialType;
|
let nodeCredentialType;
|
||||||
|
|
||||||
if (authentication === 'genericCredentialType') {
|
if (authentication === 'genericCredentialType') {
|
||||||
try {
|
const genericAuthType = this.getNodeParameter('genericAuthType', 0) as string;
|
||||||
httpBasicAuth = await this.getCredentials('httpBasicAuth');
|
|
||||||
} catch (_) {}
|
if (genericAuthType === 'httpBasicAuth') {
|
||||||
try {
|
try {
|
||||||
httpDigestAuth = await this.getCredentials('httpDigestAuth');
|
httpBasicAuth = await this.getCredentials('httpBasicAuth');
|
||||||
} catch (_) {}
|
} catch (_) {}
|
||||||
try {
|
} else if (genericAuthType === 'httpDigestAuth') {
|
||||||
httpHeaderAuth = await this.getCredentials('httpHeaderAuth');
|
try {
|
||||||
} catch (_) {}
|
httpDigestAuth = await this.getCredentials('httpDigestAuth');
|
||||||
try {
|
} catch (_) {}
|
||||||
httpQueryAuth = await this.getCredentials('httpQueryAuth');
|
} else if (genericAuthType === 'httpHeaderAuth') {
|
||||||
} catch (_) {}
|
try {
|
||||||
try {
|
httpHeaderAuth = await this.getCredentials('httpHeaderAuth');
|
||||||
oAuth1Api = await this.getCredentials('oAuth1Api');
|
} catch (_) {}
|
||||||
} catch (_) {}
|
} else if (genericAuthType === 'httpQueryAuth') {
|
||||||
try {
|
try {
|
||||||
oAuth2Api = await this.getCredentials('oAuth2Api');
|
httpQueryAuth = await this.getCredentials('httpQueryAuth');
|
||||||
} catch (_) {}
|
} catch (_) {}
|
||||||
|
} else if (genericAuthType === 'oAuth1Api') {
|
||||||
|
try {
|
||||||
|
oAuth1Api = await this.getCredentials('oAuth1Api');
|
||||||
|
} catch (_) {}
|
||||||
|
} else if (genericAuthType === 'oAuth2Api') {
|
||||||
|
try {
|
||||||
|
oAuth2Api = await this.getCredentials('oAuth2Api');
|
||||||
|
} catch (_) {}
|
||||||
|
}
|
||||||
} else if (authentication === 'predefinedCredentialType') {
|
} else if (authentication === 'predefinedCredentialType') {
|
||||||
try {
|
try {
|
||||||
nodeCredentialType = this.getNodeParameter('nodeCredentialType', 0) as string;
|
nodeCredentialType = this.getNodeParameter('nodeCredentialType', 0) as string;
|
||||||
|
|||||||
Reference in New Issue
Block a user