n8n/packages/nodes-base/credentials/NextCloudOAuth2Api.credentials.ts

60 lines
1.2 KiB
TypeScript
Raw Normal View History

import type { ICredentialType, INodeProperties } from 'n8n-workflow';
2020-06-17 10:38:30 -07:00
export class NextCloudOAuth2Api implements ICredentialType {
name = 'nextCloudOAuth2Api';
extends = ['oAuth2Api'];
2020-06-17 10:38:30 -07:00
displayName = 'NextCloud OAuth2 API';
documentationUrl = 'nextCloud';
properties: INodeProperties[] = [
{
displayName: 'Grant Type',
name: 'grantType',
type: 'hidden',
default: 'authorizationCode',
},
2020-06-17 10:38:30 -07:00
{
displayName: 'Web DAV URL',
name: 'webDavUrl',
type: 'string',
2020-07-22 14:52:40 -07:00
placeholder: 'https://nextcloud.example.com/remote.php/webdav',
2020-06-17 10:38:30 -07:00
default: '',
},
{
displayName: 'Authorization URL',
name: 'authUrl',
type: 'string',
2020-06-17 10:38:30 -07:00
default: 'https://nextcloud.example.com/apps/oauth2/authorize',
required: true,
},
{
displayName: 'Access Token URL',
name: 'accessTokenUrl',
type: 'string',
2020-06-17 10:38:30 -07:00
default: 'https://nextcloud.example.com/apps/oauth2/api/v1/token',
required: true,
},
{
displayName: 'Scope',
name: 'scope',
type: 'hidden',
2020-06-17 10:38:30 -07:00
default: '',
},
{
displayName: 'Auth URI Query Parameters',
name: 'authQueryParameters',
type: 'hidden',
2020-06-17 10:38:30 -07:00
default: '',
},
{
displayName: 'Authentication',
name: 'authentication',
type: 'hidden',
2020-06-17 10:38:30 -07:00
default: 'body',
},
];
}