mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
feat(core): Add "Client Credentials" grant type to OAuth2 (#3489)
* ⚡ Add OAuth2 client credentials grant type * ⚡ Improvements * 🐛 Fix linting issue * 🐛 Fix typo * 🐛 Fix small issue with type * 🐛 When token expire get a new one instead of refreshing it * ⚡ Fix issue that it did not display it correctly for OAuth1 Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
This commit is contained in:
@@ -57,6 +57,8 @@ import {
|
|||||||
WorkflowExecuteMode,
|
WorkflowExecuteMode,
|
||||||
LoggerProxy as Logger,
|
LoggerProxy as Logger,
|
||||||
IExecuteData,
|
IExecuteData,
|
||||||
|
OAuth2GrantType,
|
||||||
|
IOAuth2Credentials,
|
||||||
} from 'n8n-workflow';
|
} from 'n8n-workflow';
|
||||||
|
|
||||||
import { Agent } from 'https';
|
import { Agent } from 'https';
|
||||||
@@ -881,19 +883,46 @@ export async function requestOAuth2(
|
|||||||
oAuth2Options?: IOAuth2Options,
|
oAuth2Options?: IOAuth2Options,
|
||||||
isN8nRequest = false,
|
isN8nRequest = false,
|
||||||
) {
|
) {
|
||||||
const credentials = await this.getCredentials(credentialsType);
|
const credentials = (await this.getCredentials(credentialsType)) as unknown as IOAuth2Credentials;
|
||||||
|
|
||||||
if (credentials.oauthTokenData === undefined) {
|
// Only the OAuth2 with authorization code grant needs connection
|
||||||
|
if (
|
||||||
|
credentials.grantType === OAuth2GrantType.authorizationCode &&
|
||||||
|
credentials.oauthTokenData === undefined
|
||||||
|
) {
|
||||||
throw new Error('OAuth credentials not connected!');
|
throw new Error('OAuth credentials not connected!');
|
||||||
}
|
}
|
||||||
|
|
||||||
const oAuthClient = new clientOAuth2({
|
const oAuthClient = new clientOAuth2({
|
||||||
clientId: credentials.clientId as string,
|
clientId: credentials.clientId,
|
||||||
clientSecret: credentials.clientSecret as string,
|
clientSecret: credentials.clientSecret,
|
||||||
accessTokenUri: credentials.accessTokenUrl as string,
|
accessTokenUri: credentials.accessTokenUrl,
|
||||||
|
scopes: credentials.scope.split(' '),
|
||||||
});
|
});
|
||||||
|
|
||||||
const oauthTokenData = credentials.oauthTokenData as clientOAuth2.Data;
|
let oauthTokenData = credentials.oauthTokenData as clientOAuth2.Data;
|
||||||
|
// if it's the first time using the credentials, get the access token and save it into the DB.
|
||||||
|
if (credentials.grantType === OAuth2GrantType.clientCredentials && oauthTokenData === undefined) {
|
||||||
|
const { data } = await oAuthClient.credentials.getToken();
|
||||||
|
|
||||||
|
// Find the credentials
|
||||||
|
if (!node.credentials || !node.credentials[credentialsType]) {
|
||||||
|
throw new Error(
|
||||||
|
`The node "${node.name}" does not have credentials of type "${credentialsType}"!`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
const nodeCredentials = node.credentials[credentialsType];
|
||||||
|
|
||||||
|
// Save the refreshed token
|
||||||
|
await additionalData.credentialsHelper.updateCredentials(
|
||||||
|
nodeCredentials,
|
||||||
|
credentialsType,
|
||||||
|
credentials as unknown as ICredentialDataDecryptedObject,
|
||||||
|
);
|
||||||
|
|
||||||
|
oauthTokenData = data;
|
||||||
|
}
|
||||||
|
|
||||||
const token = oAuthClient.createToken(
|
const token = oAuthClient.createToken(
|
||||||
get(oauthTokenData, oAuth2Options?.property as string) || oauthTokenData.accessToken,
|
get(oauthTokenData, oAuth2Options?.property as string) || oauthTokenData.accessToken,
|
||||||
@@ -926,8 +955,8 @@ export async function requestOAuth2(
|
|||||||
|
|
||||||
if (oAuth2Options?.includeCredentialsOnRefreshOnBody) {
|
if (oAuth2Options?.includeCredentialsOnRefreshOnBody) {
|
||||||
const body: IDataObject = {
|
const body: IDataObject = {
|
||||||
client_id: credentials.clientId as string,
|
client_id: credentials.clientId,
|
||||||
client_secret: credentials.clientSecret as string,
|
client_secret: credentials.clientSecret,
|
||||||
};
|
};
|
||||||
tokenRefreshOptions.body = body;
|
tokenRefreshOptions.body = body;
|
||||||
// Override authorization property so the credentails are not included in it
|
// Override authorization property so the credentails are not included in it
|
||||||
@@ -940,7 +969,15 @@ export async function requestOAuth2(
|
|||||||
`OAuth2 token for "${credentialsType}" used by node "${node.name}" expired. Should revalidate.`,
|
`OAuth2 token for "${credentialsType}" used by node "${node.name}" expired. Should revalidate.`,
|
||||||
);
|
);
|
||||||
|
|
||||||
const newToken = await token.refresh(tokenRefreshOptions);
|
let newToken;
|
||||||
|
|
||||||
|
// if it's OAuth2 with client credentials grant type, get a new token
|
||||||
|
// instead of refreshing it.
|
||||||
|
if (OAuth2GrantType.clientCredentials === credentials.grantType) {
|
||||||
|
newToken = await token.client.credentials.getToken();
|
||||||
|
} else {
|
||||||
|
newToken = await token.refresh(tokenRefreshOptions);
|
||||||
|
}
|
||||||
|
|
||||||
Logger.debug(
|
Logger.debug(
|
||||||
`OAuth2 token for "${credentialsType}" used by node "${node.name}" has been renewed.`,
|
`OAuth2 token for "${credentialsType}" used by node "${node.name}" has been renewed.`,
|
||||||
@@ -960,7 +997,7 @@ export async function requestOAuth2(
|
|||||||
await additionalData.credentialsHelper.updateCredentials(
|
await additionalData.credentialsHelper.updateCredentials(
|
||||||
nodeCredentials,
|
nodeCredentials,
|
||||||
credentialsType,
|
credentialsType,
|
||||||
credentials,
|
credentials as unknown as ICredentialDataDecryptedObject,
|
||||||
);
|
);
|
||||||
|
|
||||||
Logger.debug(
|
Logger.debug(
|
||||||
|
|||||||
@@ -299,9 +299,17 @@ export default mixins(showMessage, nodeHelpers).extend({
|
|||||||
},
|
},
|
||||||
isOAuthType(): boolean {
|
isOAuthType(): boolean {
|
||||||
return !!this.credentialTypeName && (
|
return !!this.credentialTypeName && (
|
||||||
['oAuth1Api', 'oAuth2Api'].includes(this.credentialTypeName) ||
|
(
|
||||||
this.parentTypes.includes('oAuth1Api') ||
|
(
|
||||||
|
this.credentialTypeName === 'oAuth2Api' ||
|
||||||
this.parentTypes.includes('oAuth2Api')
|
this.parentTypes.includes('oAuth2Api')
|
||||||
|
) && this.credentialData.grantType === 'authorizationCode'
|
||||||
|
)
|
||||||
|
||
|
||||||
|
(
|
||||||
|
this.credentialTypeName === 'oAuth1Api' ||
|
||||||
|
this.parentTypes.includes('oAuth1Api')
|
||||||
|
)
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
isOAuthConnected(): boolean {
|
isOAuthConnected(): boolean {
|
||||||
|
|||||||
@@ -12,6 +12,12 @@ export class AcuitySchedulingOAuth2Api implements ICredentialType {
|
|||||||
displayName = 'AcuityScheduling OAuth2 API';
|
displayName = 'AcuityScheduling OAuth2 API';
|
||||||
documentationUrl = 'acuityScheduling';
|
documentationUrl = 'acuityScheduling';
|
||||||
properties: INodeProperties[] = [
|
properties: INodeProperties[] = [
|
||||||
|
{
|
||||||
|
displayName: 'Grant Type',
|
||||||
|
name: 'grantType',
|
||||||
|
type: 'hidden',
|
||||||
|
default: 'authorizationCode',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Authorization URL',
|
displayName: 'Authorization URL',
|
||||||
name: 'authUrl',
|
name: 'authUrl',
|
||||||
|
|||||||
@@ -11,6 +11,12 @@ export class AsanaOAuth2Api implements ICredentialType {
|
|||||||
displayName = 'Asana OAuth2 API';
|
displayName = 'Asana OAuth2 API';
|
||||||
documentationUrl = 'asana';
|
documentationUrl = 'asana';
|
||||||
properties: INodeProperties[] = [
|
properties: INodeProperties[] = [
|
||||||
|
{
|
||||||
|
displayName: 'Grant Type',
|
||||||
|
name: 'grantType',
|
||||||
|
type: 'hidden',
|
||||||
|
default: 'authorizationCode',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Authorization URL',
|
displayName: 'Authorization URL',
|
||||||
name: 'authUrl',
|
name: 'authUrl',
|
||||||
|
|||||||
@@ -12,6 +12,12 @@ export class BitlyOAuth2Api implements ICredentialType {
|
|||||||
'oAuth2Api',
|
'oAuth2Api',
|
||||||
];
|
];
|
||||||
properties: INodeProperties[] = [
|
properties: INodeProperties[] = [
|
||||||
|
{
|
||||||
|
displayName: 'Grant Type',
|
||||||
|
name: 'grantType',
|
||||||
|
type: 'hidden',
|
||||||
|
default: 'authorizationCode',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Authorization URL',
|
displayName: 'Authorization URL',
|
||||||
name: 'authUrl',
|
name: 'authUrl',
|
||||||
|
|||||||
@@ -11,6 +11,12 @@ export class BoxOAuth2Api implements ICredentialType {
|
|||||||
displayName = 'Box OAuth2 API';
|
displayName = 'Box OAuth2 API';
|
||||||
documentationUrl = 'box';
|
documentationUrl = 'box';
|
||||||
properties: INodeProperties[] = [
|
properties: INodeProperties[] = [
|
||||||
|
{
|
||||||
|
displayName: 'Grant Type',
|
||||||
|
name: 'grantType',
|
||||||
|
type: 'hidden',
|
||||||
|
default: 'authorizationCode',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Authorization URL',
|
displayName: 'Authorization URL',
|
||||||
name: 'authUrl',
|
name: 'authUrl',
|
||||||
|
|||||||
@@ -10,6 +10,12 @@ export class CiscoWebexOAuth2Api implements ICredentialType {
|
|||||||
];
|
];
|
||||||
displayName = 'Cisco Webex OAuth2 API';
|
displayName = 'Cisco Webex OAuth2 API';
|
||||||
properties: INodeProperties[] = [
|
properties: INodeProperties[] = [
|
||||||
|
{
|
||||||
|
displayName: 'Grant Type',
|
||||||
|
name: 'grantType',
|
||||||
|
type: 'hidden',
|
||||||
|
default: 'authorizationCode',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Authorization URL',
|
displayName: 'Authorization URL',
|
||||||
name: 'authUrl',
|
name: 'authUrl',
|
||||||
|
|||||||
@@ -11,6 +11,12 @@ export class ClickUpOAuth2Api implements ICredentialType {
|
|||||||
displayName = 'ClickUp OAuth2 API';
|
displayName = 'ClickUp OAuth2 API';
|
||||||
documentationUrl = 'clickUp';
|
documentationUrl = 'clickUp';
|
||||||
properties: INodeProperties[] = [
|
properties: INodeProperties[] = [
|
||||||
|
{
|
||||||
|
displayName: 'Grant Type',
|
||||||
|
name: 'grantType',
|
||||||
|
type: 'hidden',
|
||||||
|
default: 'authorizationCode',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Authorization URL',
|
displayName: 'Authorization URL',
|
||||||
name: 'authUrl',
|
name: 'authUrl',
|
||||||
|
|||||||
@@ -12,6 +12,12 @@ export class DriftOAuth2Api implements ICredentialType {
|
|||||||
displayName = 'Drift OAuth2 API';
|
displayName = 'Drift OAuth2 API';
|
||||||
documentationUrl = 'drift';
|
documentationUrl = 'drift';
|
||||||
properties: INodeProperties[] = [
|
properties: INodeProperties[] = [
|
||||||
|
{
|
||||||
|
displayName: 'Grant Type',
|
||||||
|
name: 'grantType',
|
||||||
|
type: 'hidden',
|
||||||
|
default: 'authorizationCode',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Authorization URL',
|
displayName: 'Authorization URL',
|
||||||
name: 'authUrl',
|
name: 'authUrl',
|
||||||
|
|||||||
@@ -18,6 +18,12 @@ export class DropboxOAuth2Api implements ICredentialType {
|
|||||||
displayName = 'Dropbox OAuth2 API';
|
displayName = 'Dropbox OAuth2 API';
|
||||||
documentationUrl = 'dropbox';
|
documentationUrl = 'dropbox';
|
||||||
properties: INodeProperties[] = [
|
properties: INodeProperties[] = [
|
||||||
|
{
|
||||||
|
displayName: 'Grant Type',
|
||||||
|
name: 'grantType',
|
||||||
|
type: 'hidden',
|
||||||
|
default: 'authorizationCode',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Authorization URL',
|
displayName: 'Authorization URL',
|
||||||
name: 'authUrl',
|
name: 'authUrl',
|
||||||
|
|||||||
@@ -12,6 +12,12 @@ export class EventbriteOAuth2Api implements ICredentialType {
|
|||||||
displayName = 'Eventbrite OAuth2 API';
|
displayName = 'Eventbrite OAuth2 API';
|
||||||
documentationUrl = 'eventbrite';
|
documentationUrl = 'eventbrite';
|
||||||
properties: INodeProperties[] = [
|
properties: INodeProperties[] = [
|
||||||
|
{
|
||||||
|
displayName: 'Grant Type',
|
||||||
|
name: 'grantType',
|
||||||
|
type: 'hidden',
|
||||||
|
default: 'authorizationCode',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Authorization URL',
|
displayName: 'Authorization URL',
|
||||||
name: 'authUrl',
|
name: 'authUrl',
|
||||||
|
|||||||
@@ -13,6 +13,12 @@ export class FormstackOAuth2Api implements ICredentialType {
|
|||||||
displayName = 'Formstack OAuth2 API';
|
displayName = 'Formstack OAuth2 API';
|
||||||
documentationUrl = 'formstackTrigger';
|
documentationUrl = 'formstackTrigger';
|
||||||
properties: INodeProperties[] = [
|
properties: INodeProperties[] = [
|
||||||
|
{
|
||||||
|
displayName: 'Grant Type',
|
||||||
|
name: 'grantType',
|
||||||
|
type: 'hidden',
|
||||||
|
default: 'authorizationCode',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Authorization URL',
|
displayName: 'Authorization URL',
|
||||||
name: 'authUrl',
|
name: 'authUrl',
|
||||||
|
|||||||
@@ -10,6 +10,12 @@ export class GetResponseOAuth2Api implements ICredentialType {
|
|||||||
];
|
];
|
||||||
displayName = 'GetResponse OAuth2 API';
|
displayName = 'GetResponse OAuth2 API';
|
||||||
properties: INodeProperties[] = [
|
properties: INodeProperties[] = [
|
||||||
|
{
|
||||||
|
displayName: 'Grant Type',
|
||||||
|
name: 'grantType',
|
||||||
|
type: 'hidden',
|
||||||
|
default: 'authorizationCode',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Authorization URL',
|
displayName: 'Authorization URL',
|
||||||
name: 'authUrl',
|
name: 'authUrl',
|
||||||
|
|||||||
@@ -12,6 +12,12 @@ export class GithubOAuth2Api implements ICredentialType {
|
|||||||
displayName = 'GitHub OAuth2 API';
|
displayName = 'GitHub OAuth2 API';
|
||||||
documentationUrl = 'github';
|
documentationUrl = 'github';
|
||||||
properties: INodeProperties[] = [
|
properties: INodeProperties[] = [
|
||||||
|
{
|
||||||
|
displayName: 'Grant Type',
|
||||||
|
name: 'grantType',
|
||||||
|
type: 'hidden',
|
||||||
|
default: 'authorizationCode',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Github Server',
|
displayName: 'Github Server',
|
||||||
name: 'server',
|
name: 'server',
|
||||||
|
|||||||
@@ -12,6 +12,12 @@ export class GitlabOAuth2Api implements ICredentialType {
|
|||||||
displayName = 'GitLab OAuth2 API';
|
displayName = 'GitLab OAuth2 API';
|
||||||
documentationUrl = 'gitlab';
|
documentationUrl = 'gitlab';
|
||||||
properties: INodeProperties[] = [
|
properties: INodeProperties[] = [
|
||||||
|
{
|
||||||
|
displayName: 'Grant Type',
|
||||||
|
name: 'grantType',
|
||||||
|
type: 'hidden',
|
||||||
|
default: 'authorizationCode',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Gitlab Server',
|
displayName: 'Gitlab Server',
|
||||||
name: 'server',
|
name: 'server',
|
||||||
|
|||||||
@@ -11,6 +11,12 @@ export class GoToWebinarOAuth2Api implements ICredentialType {
|
|||||||
displayName = 'GoToWebinar OAuth2 API';
|
displayName = 'GoToWebinar OAuth2 API';
|
||||||
documentationUrl = 'goToWebinar';
|
documentationUrl = 'goToWebinar';
|
||||||
properties: INodeProperties[] = [
|
properties: INodeProperties[] = [
|
||||||
|
{
|
||||||
|
displayName: 'Grant Type',
|
||||||
|
name: 'grantType',
|
||||||
|
type: 'hidden',
|
||||||
|
default: 'authorizationCode',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Authorization URL',
|
displayName: 'Authorization URL',
|
||||||
name: 'authUrl',
|
name: 'authUrl',
|
||||||
|
|||||||
@@ -12,6 +12,12 @@ export class GoogleOAuth2Api implements ICredentialType {
|
|||||||
documentationUrl = 'google';
|
documentationUrl = 'google';
|
||||||
icon = 'file:Google.svg';
|
icon = 'file:Google.svg';
|
||||||
properties: INodeProperties[] = [
|
properties: INodeProperties[] = [
|
||||||
|
{
|
||||||
|
displayName: 'Grant Type',
|
||||||
|
name: 'grantType',
|
||||||
|
type: 'hidden',
|
||||||
|
default: 'authorizationCode',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Authorization URL',
|
displayName: 'Authorization URL',
|
||||||
name: 'authUrl',
|
name: 'authUrl',
|
||||||
|
|||||||
@@ -11,6 +11,12 @@ export class HarvestOAuth2Api implements ICredentialType {
|
|||||||
];
|
];
|
||||||
displayName = 'Harvest OAuth2 API';
|
displayName = 'Harvest OAuth2 API';
|
||||||
properties: INodeProperties[] = [
|
properties: INodeProperties[] = [
|
||||||
|
{
|
||||||
|
displayName: 'Grant Type',
|
||||||
|
name: 'grantType',
|
||||||
|
type: 'hidden',
|
||||||
|
default: 'authorizationCode',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Authorization URL',
|
displayName: 'Authorization URL',
|
||||||
name: 'authUrl',
|
name: 'authUrl',
|
||||||
|
|||||||
@@ -11,6 +11,12 @@ export class HelpScoutOAuth2Api implements ICredentialType {
|
|||||||
displayName = 'HelpScout OAuth2 API';
|
displayName = 'HelpScout OAuth2 API';
|
||||||
documentationUrl = 'helpScout';
|
documentationUrl = 'helpScout';
|
||||||
properties: INodeProperties[] = [
|
properties: INodeProperties[] = [
|
||||||
|
{
|
||||||
|
displayName: 'Grant Type',
|
||||||
|
name: 'grantType',
|
||||||
|
type: 'hidden',
|
||||||
|
default: 'authorizationCode',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Authorization URL',
|
displayName: 'Authorization URL',
|
||||||
name: 'authUrl',
|
name: 'authUrl',
|
||||||
|
|||||||
@@ -20,6 +20,12 @@ export class HubspotDeveloperApi implements ICredentialType {
|
|||||||
'oAuth2Api',
|
'oAuth2Api',
|
||||||
];
|
];
|
||||||
properties: INodeProperties[] = [
|
properties: INodeProperties[] = [
|
||||||
|
{
|
||||||
|
displayName: 'Grant Type',
|
||||||
|
name: 'grantType',
|
||||||
|
type: 'hidden',
|
||||||
|
default: 'authorizationCode',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Authorization URL',
|
displayName: 'Authorization URL',
|
||||||
name: 'authUrl',
|
name: 'authUrl',
|
||||||
|
|||||||
@@ -26,6 +26,12 @@ export class HubspotOAuth2Api implements ICredentialType {
|
|||||||
displayName = 'HubSpot OAuth2 API';
|
displayName = 'HubSpot OAuth2 API';
|
||||||
documentationUrl = 'hubspot';
|
documentationUrl = 'hubspot';
|
||||||
properties: INodeProperties[] = [
|
properties: INodeProperties[] = [
|
||||||
|
{
|
||||||
|
displayName: 'Grant Type',
|
||||||
|
name: 'grantType',
|
||||||
|
type: 'hidden',
|
||||||
|
default: 'authorizationCode',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Authorization URL',
|
displayName: 'Authorization URL',
|
||||||
name: 'authUrl',
|
name: 'authUrl',
|
||||||
|
|||||||
@@ -15,6 +15,12 @@ export class KeapOAuth2Api implements ICredentialType {
|
|||||||
displayName = 'Keap OAuth2 API';
|
displayName = 'Keap OAuth2 API';
|
||||||
documentationUrl = 'keap';
|
documentationUrl = 'keap';
|
||||||
properties: INodeProperties[] = [
|
properties: INodeProperties[] = [
|
||||||
|
{
|
||||||
|
displayName: 'Grant Type',
|
||||||
|
name: 'grantType',
|
||||||
|
type: 'hidden',
|
||||||
|
default: 'authorizationCode',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Authorization URL',
|
displayName: 'Authorization URL',
|
||||||
name: 'authUrl',
|
name: 'authUrl',
|
||||||
|
|||||||
@@ -11,6 +11,12 @@ export class LineNotifyOAuth2Api implements ICredentialType {
|
|||||||
displayName = 'Line Notify OAuth2 API';
|
displayName = 'Line Notify OAuth2 API';
|
||||||
documentationUrl = 'line';
|
documentationUrl = 'line';
|
||||||
properties: INodeProperties[] = [
|
properties: INodeProperties[] = [
|
||||||
|
{
|
||||||
|
displayName: 'Grant Type',
|
||||||
|
name: 'grantType',
|
||||||
|
type: 'hidden',
|
||||||
|
default: 'authorizationCode',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Authorization URL',
|
displayName: 'Authorization URL',
|
||||||
name: 'authUrl',
|
name: 'authUrl',
|
||||||
|
|||||||
@@ -12,6 +12,12 @@ export class LinkedInOAuth2Api implements ICredentialType {
|
|||||||
displayName = 'LinkedIn OAuth2 API';
|
displayName = 'LinkedIn OAuth2 API';
|
||||||
documentationUrl = 'linkedIn';
|
documentationUrl = 'linkedIn';
|
||||||
properties: INodeProperties[] = [
|
properties: INodeProperties[] = [
|
||||||
|
{
|
||||||
|
displayName: 'Grant Type',
|
||||||
|
name: 'grantType',
|
||||||
|
type: 'hidden',
|
||||||
|
default: 'authorizationCode',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Organization Support',
|
displayName: 'Organization Support',
|
||||||
name: 'organizationSupport',
|
name: 'organizationSupport',
|
||||||
|
|||||||
@@ -12,6 +12,12 @@ export class MailchimpOAuth2Api implements ICredentialType {
|
|||||||
displayName = 'Mailchimp OAuth2 API';
|
displayName = 'Mailchimp OAuth2 API';
|
||||||
documentationUrl = 'mailchimp';
|
documentationUrl = 'mailchimp';
|
||||||
properties: INodeProperties[] = [
|
properties: INodeProperties[] = [
|
||||||
|
{
|
||||||
|
displayName: 'Grant Type',
|
||||||
|
name: 'grantType',
|
||||||
|
type: 'hidden',
|
||||||
|
default: 'authorizationCode',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Authorization URL',
|
displayName: 'Authorization URL',
|
||||||
name: 'authUrl',
|
name: 'authUrl',
|
||||||
|
|||||||
@@ -11,6 +11,12 @@ export class MauticOAuth2Api implements ICredentialType {
|
|||||||
displayName = 'Mautic OAuth2 API';
|
displayName = 'Mautic OAuth2 API';
|
||||||
documentationUrl = 'mautic';
|
documentationUrl = 'mautic';
|
||||||
properties: INodeProperties[] = [
|
properties: INodeProperties[] = [
|
||||||
|
{
|
||||||
|
displayName: 'Grant Type',
|
||||||
|
name: 'grantType',
|
||||||
|
type: 'hidden',
|
||||||
|
default: 'authorizationCode',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
displayName: 'URL',
|
displayName: 'URL',
|
||||||
name: 'url',
|
name: 'url',
|
||||||
|
|||||||
@@ -11,6 +11,12 @@ export class MediumOAuth2Api implements ICredentialType {
|
|||||||
displayName = 'Medium OAuth2 API';
|
displayName = 'Medium OAuth2 API';
|
||||||
documentationUrl = 'medium';
|
documentationUrl = 'medium';
|
||||||
properties: INodeProperties[] = [
|
properties: INodeProperties[] = [
|
||||||
|
{
|
||||||
|
displayName: 'Grant Type',
|
||||||
|
name: 'grantType',
|
||||||
|
type: 'hidden',
|
||||||
|
default: 'authorizationCode',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Authorization URL',
|
displayName: 'Authorization URL',
|
||||||
name: 'authUrl',
|
name: 'authUrl',
|
||||||
|
|||||||
@@ -12,6 +12,12 @@ export class MicrosoftOAuth2Api implements ICredentialType {
|
|||||||
displayName = 'Microsoft OAuth2 API';
|
displayName = 'Microsoft OAuth2 API';
|
||||||
documentationUrl = 'microsoft';
|
documentationUrl = 'microsoft';
|
||||||
properties: INodeProperties[] = [
|
properties: INodeProperties[] = [
|
||||||
|
{
|
||||||
|
displayName: 'Grant Type',
|
||||||
|
name: 'grantType',
|
||||||
|
type: 'hidden',
|
||||||
|
default: 'authorizationCode',
|
||||||
|
},
|
||||||
//info about the tenantID
|
//info about the tenantID
|
||||||
//https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-v2-protocols#endpoints
|
//https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-v2-protocols#endpoints
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -16,6 +16,12 @@ export class MondayComOAuth2Api implements ICredentialType {
|
|||||||
displayName = 'Monday.com OAuth2 API';
|
displayName = 'Monday.com OAuth2 API';
|
||||||
documentationUrl = 'monday';
|
documentationUrl = 'monday';
|
||||||
properties: INodeProperties[] = [
|
properties: INodeProperties[] = [
|
||||||
|
{
|
||||||
|
displayName: 'Grant Type',
|
||||||
|
name: 'grantType',
|
||||||
|
type: 'hidden',
|
||||||
|
default: 'authorizationCode',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Authorization URL',
|
displayName: 'Authorization URL',
|
||||||
name: 'authUrl',
|
name: 'authUrl',
|
||||||
|
|||||||
@@ -12,6 +12,12 @@ export class NextCloudOAuth2Api implements ICredentialType {
|
|||||||
displayName = 'NextCloud OAuth2 API';
|
displayName = 'NextCloud OAuth2 API';
|
||||||
documentationUrl = 'nextCloud';
|
documentationUrl = 'nextCloud';
|
||||||
properties: INodeProperties[] = [
|
properties: INodeProperties[] = [
|
||||||
|
{
|
||||||
|
displayName: 'Grant Type',
|
||||||
|
name: 'grantType',
|
||||||
|
type: 'hidden',
|
||||||
|
default: 'authorizationCode',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Web DAV URL',
|
displayName: 'Web DAV URL',
|
||||||
name: 'webDavUrl',
|
name: 'webDavUrl',
|
||||||
|
|||||||
@@ -11,6 +11,12 @@ export class NotionOAuth2Api implements ICredentialType {
|
|||||||
displayName = 'Notion OAuth2 API';
|
displayName = 'Notion OAuth2 API';
|
||||||
documentationUrl = 'notion';
|
documentationUrl = 'notion';
|
||||||
properties: INodeProperties[] = [
|
properties: INodeProperties[] = [
|
||||||
|
{
|
||||||
|
displayName: 'Grant Type',
|
||||||
|
name: 'grantType',
|
||||||
|
type: 'hidden',
|
||||||
|
default: 'authorizationCode',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Authorization URL',
|
displayName: 'Authorization URL',
|
||||||
name: 'authUrl',
|
name: 'authUrl',
|
||||||
|
|||||||
@@ -10,10 +10,33 @@ export class OAuth2Api implements ICredentialType {
|
|||||||
documentationUrl = 'httpRequest';
|
documentationUrl = 'httpRequest';
|
||||||
genericAuth = true;
|
genericAuth = true;
|
||||||
properties: INodeProperties[] = [
|
properties: INodeProperties[] = [
|
||||||
|
{
|
||||||
|
displayName: 'Grant Type',
|
||||||
|
name: 'grantType',
|
||||||
|
type: 'options',
|
||||||
|
options: [
|
||||||
|
{
|
||||||
|
name: 'Authorization Code',
|
||||||
|
value: 'authorizationCode',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Client Credentials',
|
||||||
|
value: 'clientCredentials',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
default: 'authorizationCode',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Authorization URL',
|
displayName: 'Authorization URL',
|
||||||
name: 'authUrl',
|
name: 'authUrl',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
|
displayOptions: {
|
||||||
|
show: {
|
||||||
|
grantType: [
|
||||||
|
'authorizationCode',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
default: '',
|
default: '',
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
@@ -51,6 +74,13 @@ export class OAuth2Api implements ICredentialType {
|
|||||||
displayName: 'Auth URI Query Parameters',
|
displayName: 'Auth URI Query Parameters',
|
||||||
name: 'authQueryParameters',
|
name: 'authQueryParameters',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
|
displayOptions: {
|
||||||
|
show: {
|
||||||
|
grantType: [
|
||||||
|
'authorizationCode',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
default: '',
|
default: '',
|
||||||
description: 'For some services additional query parameters have to be set which can be defined here',
|
description: 'For some services additional query parameters have to be set which can be defined here',
|
||||||
placeholder: 'access_type=offline',
|
placeholder: 'access_type=offline',
|
||||||
@@ -59,6 +89,13 @@ export class OAuth2Api implements ICredentialType {
|
|||||||
displayName: 'Authentication',
|
displayName: 'Authentication',
|
||||||
name: 'authentication',
|
name: 'authentication',
|
||||||
type: 'options',
|
type: 'options',
|
||||||
|
displayOptions: {
|
||||||
|
show: {
|
||||||
|
grantType: [
|
||||||
|
'authorizationCode',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
options: [
|
options: [
|
||||||
{
|
{
|
||||||
name: 'Body',
|
name: 'Body',
|
||||||
|
|||||||
@@ -11,6 +11,12 @@ export class PagerDutyOAuth2Api implements ICredentialType {
|
|||||||
displayName = 'PagerDuty OAuth2 API';
|
displayName = 'PagerDuty OAuth2 API';
|
||||||
documentationUrl = 'pagerDuty';
|
documentationUrl = 'pagerDuty';
|
||||||
properties: INodeProperties[] = [
|
properties: INodeProperties[] = [
|
||||||
|
{
|
||||||
|
displayName: 'Grant Type',
|
||||||
|
name: 'grantType',
|
||||||
|
type: 'hidden',
|
||||||
|
default: 'authorizationCode',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Authorization URL',
|
displayName: 'Authorization URL',
|
||||||
name: 'authUrl',
|
name: 'authUrl',
|
||||||
|
|||||||
@@ -11,6 +11,12 @@ export class PhilipsHueOAuth2Api implements ICredentialType {
|
|||||||
displayName = 'PhilipHue OAuth2 API';
|
displayName = 'PhilipHue OAuth2 API';
|
||||||
documentationUrl = 'philipsHue';
|
documentationUrl = 'philipsHue';
|
||||||
properties: INodeProperties[] = [
|
properties: INodeProperties[] = [
|
||||||
|
{
|
||||||
|
displayName: 'Grant Type',
|
||||||
|
name: 'grantType',
|
||||||
|
type: 'hidden',
|
||||||
|
default: 'authorizationCode',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
displayName: 'APP ID',
|
displayName: 'APP ID',
|
||||||
name: 'appId',
|
name: 'appId',
|
||||||
|
|||||||
@@ -11,6 +11,12 @@ export class PipedriveOAuth2Api implements ICredentialType {
|
|||||||
displayName = 'Pipedrive OAuth2 API';
|
displayName = 'Pipedrive OAuth2 API';
|
||||||
documentationUrl = 'pipedrive';
|
documentationUrl = 'pipedrive';
|
||||||
properties: INodeProperties[] = [
|
properties: INodeProperties[] = [
|
||||||
|
{
|
||||||
|
displayName: 'Grant Type',
|
||||||
|
name: 'grantType',
|
||||||
|
type: 'hidden',
|
||||||
|
default: 'authorizationCode',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Authorization URL',
|
displayName: 'Authorization URL',
|
||||||
name: 'authUrl',
|
name: 'authUrl',
|
||||||
|
|||||||
@@ -11,6 +11,12 @@ export class PushbulletOAuth2Api implements ICredentialType {
|
|||||||
displayName = 'Pushbullet OAuth2 API';
|
displayName = 'Pushbullet OAuth2 API';
|
||||||
documentationUrl = 'pushbullet';
|
documentationUrl = 'pushbullet';
|
||||||
properties: INodeProperties[] = [
|
properties: INodeProperties[] = [
|
||||||
|
{
|
||||||
|
displayName: 'Grant Type',
|
||||||
|
name: 'grantType',
|
||||||
|
type: 'hidden',
|
||||||
|
default: 'authorizationCode',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Authorization URL',
|
displayName: 'Authorization URL',
|
||||||
name: 'authUrl',
|
name: 'authUrl',
|
||||||
|
|||||||
@@ -13,6 +13,12 @@ export class QuickBooksOAuth2Api implements ICredentialType {
|
|||||||
displayName = 'QuickBooks Online OAuth2 API';
|
displayName = 'QuickBooks Online OAuth2 API';
|
||||||
documentationUrl = 'quickbooks';
|
documentationUrl = 'quickbooks';
|
||||||
properties: INodeProperties[] = [
|
properties: INodeProperties[] = [
|
||||||
|
{
|
||||||
|
displayName: 'Grant Type',
|
||||||
|
name: 'grantType',
|
||||||
|
type: 'hidden',
|
||||||
|
default: 'authorizationCode',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Authorization URL',
|
displayName: 'Authorization URL',
|
||||||
name: 'authUrl',
|
name: 'authUrl',
|
||||||
|
|||||||
@@ -13,6 +13,12 @@ export class RaindropOAuth2Api implements ICredentialType {
|
|||||||
displayName = 'Raindrop OAuth2 API';
|
displayName = 'Raindrop OAuth2 API';
|
||||||
documentationUrl = 'raindrop';
|
documentationUrl = 'raindrop';
|
||||||
properties: INodeProperties[] = [
|
properties: INodeProperties[] = [
|
||||||
|
{
|
||||||
|
displayName: 'Grant Type',
|
||||||
|
name: 'grantType',
|
||||||
|
type: 'hidden',
|
||||||
|
default: 'authorizationCode',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Authorization URL',
|
displayName: 'Authorization URL',
|
||||||
name: 'authUrl',
|
name: 'authUrl',
|
||||||
|
|||||||
@@ -23,6 +23,12 @@ export class RedditOAuth2Api implements ICredentialType {
|
|||||||
displayName = 'Reddit OAuth2 API';
|
displayName = 'Reddit OAuth2 API';
|
||||||
documentationUrl = 'reddit';
|
documentationUrl = 'reddit';
|
||||||
properties: INodeProperties[] = [
|
properties: INodeProperties[] = [
|
||||||
|
{
|
||||||
|
displayName: 'Grant Type',
|
||||||
|
name: 'grantType',
|
||||||
|
type: 'hidden',
|
||||||
|
default: 'authorizationCode',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Auth URI Query Parameters',
|
displayName: 'Auth URI Query Parameters',
|
||||||
name: 'authQueryParameters',
|
name: 'authQueryParameters',
|
||||||
|
|||||||
@@ -27,6 +27,12 @@ export class SalesforceOAuth2Api implements ICredentialType {
|
|||||||
],
|
],
|
||||||
default: 'production',
|
default: 'production',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
displayName: 'Grant Type',
|
||||||
|
name: 'grantType',
|
||||||
|
type: 'hidden',
|
||||||
|
default: 'authorizationCode',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Authorization URL',
|
displayName: 'Authorization URL',
|
||||||
name: 'authUrl',
|
name: 'authUrl',
|
||||||
|
|||||||
@@ -11,6 +11,12 @@ export class SentryIoOAuth2Api implements ICredentialType {
|
|||||||
displayName = 'Sentry.io OAuth2 API';
|
displayName = 'Sentry.io OAuth2 API';
|
||||||
documentationUrl = 'sentryIo';
|
documentationUrl = 'sentryIo';
|
||||||
properties: INodeProperties[] = [
|
properties: INodeProperties[] = [
|
||||||
|
{
|
||||||
|
displayName: 'Grant Type',
|
||||||
|
name: 'grantType',
|
||||||
|
type: 'hidden',
|
||||||
|
default: 'authorizationCode',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Authorization URL',
|
displayName: 'Authorization URL',
|
||||||
name: 'authUrl',
|
name: 'authUrl',
|
||||||
|
|||||||
@@ -19,6 +19,12 @@ export class ServiceNowOAuth2Api implements ICredentialType {
|
|||||||
hint: 'The subdomain can be extracted from the URL. If the URL is: https://dev99890.service-now.com the subdomain is dev99890',
|
hint: 'The subdomain can be extracted from the URL. If the URL is: https://dev99890.service-now.com the subdomain is dev99890',
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
displayName: 'Grant Type',
|
||||||
|
name: 'grantType',
|
||||||
|
type: 'hidden',
|
||||||
|
default: 'authorizationCode',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Authorization URL',
|
displayName: 'Authorization URL',
|
||||||
name: 'authUrl',
|
name: 'authUrl',
|
||||||
|
|||||||
@@ -30,6 +30,12 @@ export class SlackOAuth2Api implements ICredentialType {
|
|||||||
displayName = 'Slack OAuth2 API';
|
displayName = 'Slack OAuth2 API';
|
||||||
documentationUrl = 'slack';
|
documentationUrl = 'slack';
|
||||||
properties: INodeProperties[] = [
|
properties: INodeProperties[] = [
|
||||||
|
{
|
||||||
|
displayName: 'Grant Type',
|
||||||
|
name: 'grantType',
|
||||||
|
type: 'hidden',
|
||||||
|
default: 'authorizationCode',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Authorization URL',
|
displayName: 'Authorization URL',
|
||||||
name: 'authUrl',
|
name: 'authUrl',
|
||||||
|
|||||||
@@ -18,6 +18,12 @@ export class SpotifyOAuth2Api implements ICredentialType {
|
|||||||
type: 'hidden',
|
type: 'hidden',
|
||||||
default: 'https://api.spotify.com/',
|
default: 'https://api.spotify.com/',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
displayName: 'Grant Type',
|
||||||
|
name: 'grantType',
|
||||||
|
type: 'hidden',
|
||||||
|
default: 'authorizationCode',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Authorization URL',
|
displayName: 'Authorization URL',
|
||||||
name: 'authUrl',
|
name: 'authUrl',
|
||||||
|
|||||||
@@ -11,6 +11,12 @@ export class StravaOAuth2Api implements ICredentialType {
|
|||||||
displayName = 'Strava OAuth2 API';
|
displayName = 'Strava OAuth2 API';
|
||||||
documentationUrl = 'strava';
|
documentationUrl = 'strava';
|
||||||
properties: INodeProperties[] = [
|
properties: INodeProperties[] = [
|
||||||
|
{
|
||||||
|
displayName: 'Grant Type',
|
||||||
|
name: 'grantType',
|
||||||
|
type: 'hidden',
|
||||||
|
default: 'authorizationCode',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Authorization URL',
|
displayName: 'Authorization URL',
|
||||||
name: 'authUrl',
|
name: 'authUrl',
|
||||||
|
|||||||
@@ -20,6 +20,12 @@ export class SurveyMonkeyOAuth2Api implements ICredentialType {
|
|||||||
displayName = 'SurveyMonkey OAuth2 API';
|
displayName = 'SurveyMonkey OAuth2 API';
|
||||||
documentationUrl = 'surveyMonkey';
|
documentationUrl = 'surveyMonkey';
|
||||||
properties: INodeProperties[] = [
|
properties: INodeProperties[] = [
|
||||||
|
{
|
||||||
|
displayName: 'Grant Type',
|
||||||
|
name: 'grantType',
|
||||||
|
type: 'hidden',
|
||||||
|
default: 'authorizationCode',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Authorization URL',
|
displayName: 'Authorization URL',
|
||||||
name: 'authUrl',
|
name: 'authUrl',
|
||||||
|
|||||||
@@ -11,6 +11,12 @@ export class TodoistOAuth2Api implements ICredentialType {
|
|||||||
displayName = 'Todoist OAuth2 API';
|
displayName = 'Todoist OAuth2 API';
|
||||||
documentationUrl = 'todoist';
|
documentationUrl = 'todoist';
|
||||||
properties: INodeProperties[] = [
|
properties: INodeProperties[] = [
|
||||||
|
{
|
||||||
|
displayName: 'Grant Type',
|
||||||
|
name: 'grantType',
|
||||||
|
type: 'hidden',
|
||||||
|
default: 'authorizationCode',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Authorization URL',
|
displayName: 'Authorization URL',
|
||||||
name: 'authUrl',
|
name: 'authUrl',
|
||||||
|
|||||||
@@ -20,6 +20,12 @@ export class TwistOAuth2Api implements ICredentialType {
|
|||||||
displayName = 'Twist OAuth2 API';
|
displayName = 'Twist OAuth2 API';
|
||||||
documentationUrl = 'twist';
|
documentationUrl = 'twist';
|
||||||
properties: INodeProperties[] = [
|
properties: INodeProperties[] = [
|
||||||
|
{
|
||||||
|
displayName: 'Grant Type',
|
||||||
|
name: 'grantType',
|
||||||
|
type: 'hidden',
|
||||||
|
default: 'authorizationCode',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Authorization URL',
|
displayName: 'Authorization URL',
|
||||||
name: 'authUrl',
|
name: 'authUrl',
|
||||||
|
|||||||
@@ -17,6 +17,12 @@ export class TypeformOAuth2Api implements ICredentialType {
|
|||||||
displayName = 'Typeform OAuth2 API';
|
displayName = 'Typeform OAuth2 API';
|
||||||
documentationUrl = 'typeform';
|
documentationUrl = 'typeform';
|
||||||
properties: INodeProperties[] = [
|
properties: INodeProperties[] = [
|
||||||
|
{
|
||||||
|
displayName: 'Grant Type',
|
||||||
|
name: 'grantType',
|
||||||
|
type: 'hidden',
|
||||||
|
default: 'authorizationCode',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Authorization URL',
|
displayName: 'Authorization URL',
|
||||||
name: 'authUrl',
|
name: 'authUrl',
|
||||||
|
|||||||
@@ -11,6 +11,12 @@ export class WebflowOAuth2Api implements ICredentialType {
|
|||||||
displayName = 'Webflow OAuth2 API';
|
displayName = 'Webflow OAuth2 API';
|
||||||
documentationUrl = 'webflow';
|
documentationUrl = 'webflow';
|
||||||
properties: INodeProperties[] = [
|
properties: INodeProperties[] = [
|
||||||
|
{
|
||||||
|
displayName: 'Grant Type',
|
||||||
|
name: 'grantType',
|
||||||
|
type: 'hidden',
|
||||||
|
default: 'authorizationCode',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Authorization URL',
|
displayName: 'Authorization URL',
|
||||||
name: 'authUrl',
|
name: 'authUrl',
|
||||||
|
|||||||
@@ -18,6 +18,12 @@ export class XeroOAuth2Api implements ICredentialType {
|
|||||||
displayName = 'Xero OAuth2 API';
|
displayName = 'Xero OAuth2 API';
|
||||||
documentationUrl = 'xero';
|
documentationUrl = 'xero';
|
||||||
properties: INodeProperties[] = [
|
properties: INodeProperties[] = [
|
||||||
|
{
|
||||||
|
displayName: 'Grant Type',
|
||||||
|
name: 'grantType',
|
||||||
|
type: 'hidden',
|
||||||
|
default: 'authorizationCode',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Authorization URL',
|
displayName: 'Authorization URL',
|
||||||
name: 'authUrl',
|
name: 'authUrl',
|
||||||
|
|||||||
@@ -25,6 +25,12 @@ export class ZendeskOAuth2Api implements ICredentialType {
|
|||||||
description: 'The subdomain of your Zendesk work environment',
|
description: 'The subdomain of your Zendesk work environment',
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
displayName: 'Grant Type',
|
||||||
|
name: 'grantType',
|
||||||
|
type: 'hidden',
|
||||||
|
default: 'authorizationCode',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Authorization URL',
|
displayName: 'Authorization URL',
|
||||||
name: 'authUrl',
|
name: 'authUrl',
|
||||||
|
|||||||
@@ -11,6 +11,12 @@ export class ZohoOAuth2Api implements ICredentialType {
|
|||||||
displayName = 'Zoho OAuth2 API';
|
displayName = 'Zoho OAuth2 API';
|
||||||
documentationUrl = 'zoho';
|
documentationUrl = 'zoho';
|
||||||
properties: INodeProperties[] = [
|
properties: INodeProperties[] = [
|
||||||
|
{
|
||||||
|
displayName: 'Grant Type',
|
||||||
|
name: 'grantType',
|
||||||
|
type: 'hidden',
|
||||||
|
default: 'authorizationCode',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Authorization URL',
|
displayName: 'Authorization URL',
|
||||||
name: 'authUrl',
|
name: 'authUrl',
|
||||||
|
|||||||
@@ -9,6 +9,12 @@ export class ZoomOAuth2Api implements ICredentialType {
|
|||||||
displayName = 'Zoom OAuth2 API';
|
displayName = 'Zoom OAuth2 API';
|
||||||
documentationUrl = 'zoom';
|
documentationUrl = 'zoom';
|
||||||
properties: INodeProperties[] = [
|
properties: INodeProperties[] = [
|
||||||
|
{
|
||||||
|
displayName: 'Grant Type',
|
||||||
|
name: 'grantType',
|
||||||
|
type: 'hidden',
|
||||||
|
default: 'authorizationCode',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Authorization URL',
|
displayName: 'Authorization URL',
|
||||||
name: 'authUrl',
|
name: 'authUrl',
|
||||||
|
|||||||
@@ -1535,3 +1535,19 @@ export interface IConnectedNode {
|
|||||||
indicies: number[];
|
indicies: number[];
|
||||||
depth: number;
|
depth: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export enum OAuth2GrantType {
|
||||||
|
authorizationCode = 'authorizationCode',
|
||||||
|
clientCredentials = 'clientCredentials',
|
||||||
|
}
|
||||||
|
export interface IOAuth2Credentials {
|
||||||
|
grantType: 'authorizationCode' | 'clientCredentials';
|
||||||
|
clientId: string;
|
||||||
|
clientSecret: string;
|
||||||
|
accessTokenUrl: string;
|
||||||
|
authUrl: string;
|
||||||
|
authQueryParameters: string;
|
||||||
|
authentication: 'body' | 'header';
|
||||||
|
scope: string;
|
||||||
|
oauthTokenData?: IDataObject;
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user