mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
✨ Add support for Query Auth
This commit is contained in:
@@ -73,6 +73,17 @@ export class HttpRequest implements INodeType {
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'httpQueryAuth',
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
authentication: [
|
||||
'queryAuth',
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'oAuth1Api',
|
||||
required: true,
|
||||
@@ -114,6 +125,10 @@ export class HttpRequest implements INodeType {
|
||||
name: 'Header Auth',
|
||||
value: 'headerAuth',
|
||||
},
|
||||
{
|
||||
name: 'Query Auth',
|
||||
value: 'queryAuth',
|
||||
},
|
||||
{
|
||||
name: 'OAuth1',
|
||||
value: 'oAuth1',
|
||||
@@ -641,6 +656,7 @@ export class HttpRequest implements INodeType {
|
||||
const httpBasicAuth = await this.getCredentials('httpBasicAuth');
|
||||
const httpDigestAuth = await this.getCredentials('httpDigestAuth');
|
||||
const httpHeaderAuth = await this.getCredentials('httpHeaderAuth');
|
||||
const httpQueryAuth = await this.getCredentials('httpQueryAuth');
|
||||
const oAuth1Api = await this.getCredentials('oAuth1Api');
|
||||
const oAuth2Api = await this.getCredentials('oAuth2Api');
|
||||
|
||||
@@ -890,6 +906,12 @@ export class HttpRequest implements INodeType {
|
||||
if (httpHeaderAuth !== undefined) {
|
||||
requestOptions.headers![httpHeaderAuth.name as string] = httpHeaderAuth.value;
|
||||
}
|
||||
if (httpQueryAuth !== undefined) {
|
||||
if (!requestOptions.qs) {
|
||||
requestOptions.qs = {};
|
||||
}
|
||||
requestOptions.qs![httpQueryAuth.name as string] = httpQueryAuth.value;
|
||||
}
|
||||
if (httpDigestAuth !== undefined) {
|
||||
requestOptions.auth = {
|
||||
user: httpDigestAuth.user as string,
|
||||
|
||||
Reference in New Issue
Block a user