2020-06-01 17:42:38 -07:00
|
|
|
import {
|
|
|
|
ICredentialType,
|
|
|
|
NodePropertyTypes,
|
|
|
|
} from 'n8n-workflow';
|
|
|
|
|
|
|
|
export class OAuth1Api implements ICredentialType {
|
|
|
|
name = 'oAuth1Api';
|
|
|
|
displayName = 'OAuth1 API';
|
|
|
|
properties = [
|
|
|
|
{
|
2020-07-25 01:10:34 -07:00
|
|
|
displayName: 'Authorization URL',
|
|
|
|
name: 'authUrl',
|
2020-06-01 17:42:38 -07:00
|
|
|
type: 'string' as NodePropertyTypes,
|
|
|
|
default: '',
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
{
|
2020-07-25 01:10:34 -07:00
|
|
|
displayName: 'Access Token URL',
|
|
|
|
name: 'accessTokenUrl',
|
2020-06-01 17:42:38 -07:00
|
|
|
type: 'string' as NodePropertyTypes,
|
|
|
|
default: '',
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
{
|
2020-07-25 01:10:34 -07:00
|
|
|
displayName: 'Consumer Key',
|
|
|
|
name: 'consumerKey',
|
2020-06-01 17:42:38 -07:00
|
|
|
type: 'string' as NodePropertyTypes,
|
|
|
|
default: '',
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
{
|
2020-07-25 01:10:34 -07:00
|
|
|
displayName: 'Consumer Secret',
|
|
|
|
name: 'consumerSecret',
|
2020-06-01 17:42:38 -07:00
|
|
|
type: 'string' as NodePropertyTypes,
|
|
|
|
default: '',
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
{
|
2020-07-25 01:10:34 -07:00
|
|
|
displayName: 'Request Token URL',
|
|
|
|
name: 'requestTokenUrl',
|
2020-06-01 17:42:38 -07:00
|
|
|
type: 'string' as NodePropertyTypes,
|
|
|
|
default: '',
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Signature Method',
|
|
|
|
name: 'signatureMethod',
|
|
|
|
type: 'options' as NodePropertyTypes,
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
name: 'HMAC-SHA1',
|
|
|
|
value: 'HMAC-SHA1'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'HMAC-SHA256',
|
|
|
|
value: 'HMAC-SHA256'
|
|
|
|
},
|
|
|
|
],
|
|
|
|
default: '',
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
];
|
|
|
|
}
|