n8n/packages/nodes-base/credentials/OAuth1Api.credentials.ts

69 lines
1.2 KiB
TypeScript
Raw Normal View History

import {
ICredentialType,
INodeProperties,
} from 'n8n-workflow';
export class OAuth1Api implements ICredentialType {
name = 'oAuth1Api';
displayName = 'OAuth1 API';
documentationUrl = 'httpRequest';
properties: INodeProperties[] = [
{
displayName: 'Authorization URL',
name: 'authUrl',
type: 'string',
default: '',
required: true,
},
{
displayName: 'Access Token URL',
name: 'accessTokenUrl',
type: 'string',
default: '',
required: true,
},
{
displayName: 'Consumer Key',
name: 'consumerKey',
type: 'string',
default: '',
required: true,
},
{
displayName: 'Consumer Secret',
name: 'consumerSecret',
type: 'string',
default: '',
required: true,
},
{
displayName: 'Request Token URL',
name: 'requestTokenUrl',
type: 'string',
default: '',
required: true,
},
{
displayName: 'Signature Method',
name: 'signatureMethod',
type: 'options',
options: [
{
name: 'HMAC-SHA1',
2020-10-22 06:46:03 -07:00
value: 'HMAC-SHA1',
},
{
name: 'HMAC-SHA256',
2020-10-22 06:46:03 -07:00
value: 'HMAC-SHA256',
},
2020-10-15 01:45:43 -07:00
{
name: 'HMAC-SHA512',
2020-10-22 06:46:03 -07:00
value: 'HMAC-SHA512',
2020-10-15 01:45:43 -07:00
},
],
default: 'HMAC-SHA1',
required: true,
},
];
}