Minor improvements to OAuth1 support in HTTP Request Node

This commit is contained in:
Jan Oberhauser 2020-07-25 10:10:34 +02:00
parent 5295696e60
commit d2b99263d4
2 changed files with 14 additions and 15 deletions

View file

@ -706,7 +706,6 @@ export function getExecuteFunctions(workflow: Workflow, runExecutionData: IRunEx
return requestOAuth2.call(this, credentialsType, requestOptions, node, additionalData, tokenType, property); return requestOAuth2.call(this, credentialsType, requestOptions, node, additionalData, tokenType, property);
}, },
requestOAuth1(this: IAllExecuteFunctions, credentialsType: string, requestOptions: OptionsWithUrl | requestPromise.RequestPromiseOptions): Promise<any> { // tslint:disable-line:no-any requestOAuth1(this: IAllExecuteFunctions, credentialsType: string, requestOptions: OptionsWithUrl | requestPromise.RequestPromiseOptions): Promise<any> { // tslint:disable-line:no-any
console.log(requestOptions);
return requestOAuth1.call(this, credentialsType, requestOptions); return requestOAuth1.call(this, credentialsType, requestOptions);
}, },
returnJsonArray, returnJsonArray,

View file

@ -7,6 +7,20 @@ export class OAuth1Api implements ICredentialType {
name = 'oAuth1Api'; name = 'oAuth1Api';
displayName = 'OAuth1 API'; displayName = 'OAuth1 API';
properties = [ properties = [
{
displayName: 'Authorization URL',
name: 'authUrl',
type: 'string' as NodePropertyTypes,
default: '',
required: true,
},
{
displayName: 'Access Token URL',
name: 'accessTokenUrl',
type: 'string' as NodePropertyTypes,
default: '',
required: true,
},
{ {
displayName: 'Consumer Key', displayName: 'Consumer Key',
name: 'consumerKey', name: 'consumerKey',
@ -28,20 +42,6 @@ export class OAuth1Api implements ICredentialType {
default: '', default: '',
required: true, required: true,
}, },
{
displayName: 'Authorization URL',
name: 'authUrl',
type: 'string' as NodePropertyTypes,
default: '',
required: true,
},
{
displayName: 'Access Token URL',
name: 'accessTokenUrl',
type: 'string' as NodePropertyTypes,
default: '',
required: true,
},
{ {
displayName: 'Signature Method', displayName: 'Signature Method',
name: 'signatureMethod', name: 'signatureMethod',