mirror of
https://github.com/n8n-io/n8n.git
synced 2024-09-11 13:15:28 +03:00
Add OAuth2 with new grant type to Twitter
This commit is contained in:
parent
40eabb454a
commit
1c3b331aa1
@ -0,0 +1,54 @@
|
|||||||
|
import type { ICredentialType, INodeProperties } from 'n8n-workflow';
|
||||||
|
|
||||||
|
export class TwitterOAuth2Api implements ICredentialType {
|
||||||
|
name = 'twitterOAuth2Api';
|
||||||
|
|
||||||
|
extends = ['oAuth2Api'];
|
||||||
|
|
||||||
|
displayName = 'Twitter OAuth2 API';
|
||||||
|
|
||||||
|
documentationUrl = 'twitter';
|
||||||
|
|
||||||
|
properties: INodeProperties[] = [
|
||||||
|
{
|
||||||
|
displayName: 'Request Token URL',
|
||||||
|
name: 'requestTokenUrl',
|
||||||
|
type: 'hidden',
|
||||||
|
default: 'https://api.twitter.com/oauth/request_token',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
displayName: 'Authorization URL',
|
||||||
|
name: 'authUrl',
|
||||||
|
type: 'hidden',
|
||||||
|
default: 'https://api.twitter.com/oauth/authorize',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
displayName: 'Access Token URL',
|
||||||
|
name: 'accessTokenUrl',
|
||||||
|
type: 'hidden',
|
||||||
|
default: 'https://api.twitter.com/oauth/access_token',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
displayName: 'Signature Method',
|
||||||
|
name: 'signatureMethod',
|
||||||
|
type: 'hidden',
|
||||||
|
default: 'HMAC-SHA1',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
displayName: 'Grant Type',
|
||||||
|
name: 'grantType',
|
||||||
|
type: 'hidden',
|
||||||
|
options: [
|
||||||
|
{
|
||||||
|
name: 'Authorization Code',
|
||||||
|
value: 'authorizationCode',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Authorization Code with PKCE',
|
||||||
|
value: 'pkce',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
default: 'authorizationCode',
|
||||||
|
},
|
||||||
|
];
|
||||||
|
}
|
@ -315,6 +315,7 @@
|
|||||||
"dist/credentials/TwilioApi.credentials.js",
|
"dist/credentials/TwilioApi.credentials.js",
|
||||||
"dist/credentials/TwistOAuth2Api.credentials.js",
|
"dist/credentials/TwistOAuth2Api.credentials.js",
|
||||||
"dist/credentials/TwitterOAuth1Api.credentials.js",
|
"dist/credentials/TwitterOAuth1Api.credentials.js",
|
||||||
|
"dist/credentials/TwitterOAuth2Api.credentials.js",
|
||||||
"dist/credentials/TypeformApi.credentials.js",
|
"dist/credentials/TypeformApi.credentials.js",
|
||||||
"dist/credentials/TypeformOAuth2Api.credentials.js",
|
"dist/credentials/TypeformOAuth2Api.credentials.js",
|
||||||
"dist/credentials/UnleashedSoftwareApi.credentials.js",
|
"dist/credentials/UnleashedSoftwareApi.credentials.js",
|
||||||
|
Loading…
Reference in New Issue
Block a user