n8n/packages/nodes-base/credentials/DiscordOAuth2Api.credentials.ts
Rupenieks fd970b1325 Credentials, UI setup.
Has everything but a generic functions setup. Requires more functionality to give purpose to having OAuth2 authentication in the first place.
2020-06-15 15:33:28 +02:00

48 lines
994 B
TypeScript

import {
ICredentialType,
NodePropertyTypes,
} from 'n8n-workflow';
export class DiscordOAuth2Api implements ICredentialType {
name = 'discordOAuth2Api';
extends = [
'oAuth2Api',
];
displayName = 'Discord OAuth2 API';
properties = [
{
displayName: 'Authorization URL',
name: 'authUrl',
type: 'hidden' as NodePropertyTypes,
default: 'https://discord.com/api/oauth2/authorize',
required: true,
},
{
displayName: 'Access Token URL',
name: 'accessTokenUrl',
type: 'hidden' as NodePropertyTypes,
default: 'https://discord.com/api/oauth2/token',
required: true,
},
{
displayName: 'Scope',
name: 'scope',
type: 'string' 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',
},
];
}