re-added basicAuth for authentication

This commit is contained in:
Rupenieks 2020-06-24 16:02:44 +02:00
parent 48765b7db6
commit c1b4c570fd
3 changed files with 21 additions and 13 deletions

View file

@ -62,7 +62,7 @@ export async function pipedriveApiRequest(this: IHookFunctions | IExecuteFunctio
let responseData; let responseData;
try { try {
if (authenticationMethod === 'accessToken') { if (authenticationMethod === 'basicAuth') {
const credentials = this.getCredentials('pipedriveApi'); const credentials = this.getCredentials('pipedriveApi');
if (credentials === undefined) { if (credentials === undefined) {

View file

@ -64,7 +64,7 @@ export class Pipedrive implements INodeType {
displayOptions: { displayOptions: {
show: { show: {
authentication: [ authentication: [
'accessToken', 'basicAuth',
], ],
}, },
}, },
@ -88,16 +88,20 @@ export class Pipedrive implements INodeType {
type: 'options', type: 'options',
options: [ options: [
{ {
name: 'Access Token', name: 'Basic Auth',
value: 'accessToken', value: 'basicAuth'
}, },
{ {
name: 'OAuth2', name: 'OAuth2',
value: 'oAuth2', value: 'oAuth2',
}, },
{
name: 'None',
value: 'none',
},
], ],
default: 'accessToken', default: 'basicAuth',
description: 'The resource to operate on.', description: 'Method of authentication.',
}, },
{ {
displayName: 'Resource', displayName: 'Resource',

View file

@ -55,7 +55,7 @@ export class PipedriveTrigger implements INodeType {
displayOptions: { displayOptions: {
show: { show: {
authentication: [ authentication: [
'accessToken', 'basicAuth',
], ],
}, },
}, },
@ -72,6 +72,7 @@ export class PipedriveTrigger implements INodeType {
}, },
}, },
], ],
],
webhooks: [ webhooks: [
{ {
name: 'default', name: 'default',
@ -87,17 +88,20 @@ export class PipedriveTrigger implements INodeType {
type: 'options', type: 'options',
options: [ options: [
{ {
name: 'Access Token', name: 'Basic Auth',
value: 'accessToken' value: 'basicAuth'
}, },
{ {
name: 'OAuth2', name: 'OAuth2',
value: 'oAuth2' value: 'oAuth2',
},
{
name: 'None',
value: 'none',
}, },
], ],
default: 'accessToken', default: 'basicAuth',
description: 'If authentication should be activated for the webhook (makes it more scure).', description: 'Method of authentication.',
}, },
{ {
displayName: 'Action', displayName: 'Action',