2023-01-27 03:22:44 -08:00
|
|
|
import type { ICredentialType, INodeProperties } from 'n8n-workflow';
|
2020-06-01 17:42:38 -07:00
|
|
|
|
|
|
|
export class OAuth1Api implements ICredentialType {
|
|
|
|
name = 'oAuth1Api';
|
2022-12-02 12:54:28 -08:00
|
|
|
|
2020-06-01 17:42:38 -07:00
|
|
|
displayName = 'OAuth1 API';
|
2022-12-02 12:54:28 -08:00
|
|
|
|
2020-08-17 05:42:09 -07:00
|
|
|
documentationUrl = 'httpRequest';
|
2022-12-02 12:54:28 -08:00
|
|
|
|
2022-05-24 02:36:19 -07:00
|
|
|
genericAuth = true;
|
2022-12-02 12:54:28 -08:00
|
|
|
|
2021-06-12 09:39:55 -07:00
|
|
|
properties: INodeProperties[] = [
|
2020-06-01 17:42:38 -07:00
|
|
|
{
|
2020-07-25 01:10:34 -07:00
|
|
|
displayName: 'Authorization URL',
|
|
|
|
name: 'authUrl',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'string',
|
2020-06-01 17:42:38 -07:00
|
|
|
default: '',
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
{
|
2020-07-25 01:10:34 -07:00
|
|
|
displayName: 'Access Token URL',
|
|
|
|
name: 'accessTokenUrl',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'string',
|
2020-06-01 17:42:38 -07:00
|
|
|
default: '',
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
{
|
2020-07-25 01:10:34 -07:00
|
|
|
displayName: 'Consumer Key',
|
|
|
|
name: 'consumerKey',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'string',
|
2020-06-01 17:42:38 -07:00
|
|
|
default: '',
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
{
|
2020-07-25 01:10:34 -07:00
|
|
|
displayName: 'Consumer Secret',
|
|
|
|
name: 'consumerSecret',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'string',
|
2020-06-01 17:42:38 -07:00
|
|
|
default: '',
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
{
|
2020-07-25 01:10:34 -07:00
|
|
|
displayName: 'Request Token URL',
|
|
|
|
name: 'requestTokenUrl',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'string',
|
2020-06-01 17:42:38 -07:00
|
|
|
default: '',
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Signature Method',
|
|
|
|
name: 'signatureMethod',
|
2021-06-12 09:39:55 -07:00
|
|
|
type: 'options',
|
2020-06-01 17:42:38 -07:00
|
|
|
options: [
|
|
|
|
{
|
|
|
|
name: 'HMAC-SHA1',
|
2020-10-22 06:46:03 -07:00
|
|
|
value: 'HMAC-SHA1',
|
2020-06-01 17:42:38 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'HMAC-SHA256',
|
2020-10-22 06:46:03 -07:00
|
|
|
value: 'HMAC-SHA256',
|
2020-06-01 17:42:38 -07:00
|
|
|
},
|
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
|
|
|
},
|
2020-06-01 17:42:38 -07:00
|
|
|
],
|
2022-04-13 23:32:27 -07:00
|
|
|
default: 'HMAC-SHA1',
|
2020-06-01 17:42:38 -07:00
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
];
|
|
|
|
}
|