Improvements to PagerDuty-Node

This commit is contained in:
ricardo
2020-06-14 21:39:30 -04:00
parent 4dac84f506
commit acfc4fc39d
3 changed files with 12 additions and 6 deletions

View File

@@ -26,7 +26,13 @@ export class PagerDutyOAuth2Api implements ICredentialType {
displayName: 'Auth URI Query Parameters', displayName: 'Auth URI Query Parameters',
name: 'authQueryParameters', name: 'authQueryParameters',
type: 'hidden' as NodePropertyTypes, type: 'hidden' as NodePropertyTypes,
default: 'grant_type=authorization_code', default: '',
},
{
displayName: 'Scope',
name: 'scope',
type: 'hidden' as NodePropertyTypes,
default: '',
}, },
{ {
displayName: 'Authentication', displayName: 'Authentication',

View File

@@ -45,7 +45,7 @@ export async function pagerDutyApiRequest(this: IExecuteFunctions | IWebhookFunc
options.headers = Object.assign({}, options.headers, headers); options.headers = Object.assign({}, options.headers, headers);
try { try {
if (authenticationMethod === 'accessToken') { if (authenticationMethod === 'apiToken') {
const credentials = this.getCredentials('pagerDutyApi'); const credentials = this.getCredentials('pagerDutyApi');
if (credentials === undefined) { if (credentials === undefined) {

View File

@@ -69,7 +69,7 @@ export class PagerDuty implements INodeType {
displayOptions: { displayOptions: {
show: { show: {
authentication: [ authentication: [
'accessToken', 'apiToken',
], ],
}, },
}, },
@@ -93,15 +93,15 @@ export class PagerDuty implements INodeType {
type: 'options', type: 'options',
options: [ options: [
{ {
name: 'Access Token', name: 'API Token',
value: 'accessToken', value: 'apiToken',
}, },
{ {
name: 'OAuth2', name: 'OAuth2',
value: 'oAuth2', value: 'oAuth2',
}, },
], ],
default: 'accessToken', default: 'apiToken',
}, },
{ {
displayName: 'Resource', displayName: 'Resource',