Merge branch 'oauth-support' into feature/infusionsoft-node

This commit is contained in:
Ricardo Espinoza
2020-04-02 19:39:01 -04:00
committed by GitHub
35 changed files with 8052 additions and 75 deletions

View File

@@ -0,0 +1,46 @@
import {
ICredentialType,
NodePropertyTypes,
} from 'n8n-workflow';
export class HelpScoutOAuth2Api implements ICredentialType {
name = 'helpScoutOAuth2Api';
extends = [
'oAuth2Api',
];
displayName = 'HelpScout OAuth2 API';
properties = [
{
displayName: 'Authorization URL',
name: 'authUrl',
type: 'hidden' as NodePropertyTypes,
default: 'https://secure.helpscout.net/authentication/authorizeClientApplication',
required: true,
},
{
displayName: 'Access Token URL',
name: 'accessTokenUrl',
type: 'hidden' as NodePropertyTypes,
default: 'https://api.helpscout.net/v2/oauth2/token',
required: true,
},
{
displayName: 'Scope',
name: 'scope',
type: 'hidden' as NodePropertyTypes,
default: '',
},
{
displayName: 'Auth URI Query Parameters',
name: 'authQueryParameters',
type: 'hidden' as NodePropertyTypes,
default: '',
},
{
displayName: 'Authentication',
name: 'authentication',
type: 'hidden' as NodePropertyTypes,
default: 'body',
},
];
}

View File

@@ -0,0 +1,21 @@
import {
ICredentialType,
NodePropertyTypes,
} from 'n8n-workflow';
export class MicrosoftExcelOAuth2Api implements ICredentialType {
name = 'microsoftExcelOAuth2Api';
extends = [
'microsoftOAuth2Api',
];
displayName = 'Microsoft OAuth2 API';
properties = [
//https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-permissions-and-consent
{
displayName: 'Scope',
name: 'scope',
type: 'hidden' as NodePropertyTypes,
default: 'openid offline_access Files.ReadWrite',
},
];
}

View File

@@ -0,0 +1,38 @@
import {
ICredentialType,
NodePropertyTypes,
} from 'n8n-workflow';
export class MicrosoftOAuth2Api implements ICredentialType {
name = 'microsoftOAuth2Api';
extends = [
'oAuth2Api',
];
displayName = 'Microsoft OAuth2 API';
properties = [
{
displayName: 'Authorization URL',
name: 'authUrl',
type: 'string' as NodePropertyTypes,
default: 'https://login.microsoftonline.com/{yourtenantid}/oauth2/v2.0/authorize',
},
{
displayName: 'Access Token URL',
name: 'accessTokenUrl',
type: 'string' as NodePropertyTypes,
default: 'https://login.microsoftonline.com/{yourtenantid}/oauth2/v2.0/token',
},
{
displayName: 'Auth URI Query Parameters',
name: 'authQueryParameters',
type: 'hidden' as NodePropertyTypes,
default: 'response_mode=query',
},
{
displayName: 'Authentication',
name: 'authentication',
type: 'hidden' as NodePropertyTypes,
default: 'body',
},
];
}

View File

@@ -0,0 +1,21 @@
import {
ICredentialType,
NodePropertyTypes,
} from 'n8n-workflow';
export class MicrosoftOneDriveOAuth2Api implements ICredentialType {
name = 'microsoftOneDriveOAuth2Api';
extends = [
'microsoftOAuth2Api',
];
displayName = 'Microsoft OAuth2 API';
properties = [
//https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-permissions-and-consent
{
displayName: 'Scope',
name: 'scope',
type: 'hidden' as NodePropertyTypes,
default: 'openid offline_access Files.ReadWrite.All',
},
];
}

View File

@@ -0,0 +1,26 @@
import {
ICredentialType,
NodePropertyTypes,
} from 'n8n-workflow';
const scopes = [
'https://www.googleapis.com/auth/calendar',
'https://www.googleapis.com/auth/calendar.events',
];
export class TestOAuth2Api implements ICredentialType {
name = 'testOAuth2Api';
extends = [
'googleOAuth2Api',
];
displayName = 'Test OAuth2 API';
properties = [
{
displayName: 'Scope',
name: 'scope',
type: 'string' as NodePropertyTypes,
default: '',
placeholder: 'asdf',
},
];
}

View File

@@ -62,7 +62,7 @@ export class ZohoOAuth2Api implements ICredentialType {
displayName: 'Scope',
name: 'scope',
type: 'hidden' as NodePropertyTypes,
default: 'ZohoCRM.modules.ALL',
default: 'ZohoCRM.modules.ALL,ZohoCRM.settings.all,ZohoCRM.users.all',
},
{
displayName: 'Auth URI Query Parameters',