2020-06-01 17:42:38 -07:00
|
|
|
import {
|
|
|
|
ICredentialType,
|
2021-06-12 09:39:55 -07:00
|
|
|
INodeProperties,
|
2020-06-01 17:42:38 -07:00
|
|
|
} from 'n8n-workflow';
|
|
|
|
|
|
|
|
export class OAuth1Api implements ICredentialType {
|
|
|
|
name = 'oAuth1Api';
|
|
|
|
displayName = 'OAuth1 API';
|
2020-08-17 05:42:09 -07:00
|
|
|
documentationUrl = 'httpRequest';
|
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,
|
|
|
|
},
|
|
|
|
];
|
|
|
|
}
|