2022-07-24 08:36:17 -07:00
|
|
|
import { ICredentialType, INodeProperties } from 'n8n-workflow';
|
2021-07-23 13:28:18 -07:00
|
|
|
|
|
|
|
export class CiscoWebexOAuth2Api implements ICredentialType {
|
|
|
|
name = 'ciscoWebexOAuth2Api';
|
2022-12-02 12:54:28 -08:00
|
|
|
|
2022-07-24 08:36:17 -07:00
|
|
|
extends = ['oAuth2Api'];
|
2022-12-02 12:54:28 -08:00
|
|
|
|
2021-07-23 13:28:18 -07:00
|
|
|
displayName = 'Cisco Webex OAuth2 API';
|
2022-12-02 12:54:28 -08:00
|
|
|
|
2021-10-07 14:07:56 -07:00
|
|
|
properties: INodeProperties[] = [
|
2022-06-13 22:27:19 -07:00
|
|
|
{
|
|
|
|
displayName: 'Grant Type',
|
|
|
|
name: 'grantType',
|
|
|
|
type: 'hidden',
|
|
|
|
default: 'authorizationCode',
|
|
|
|
},
|
2021-07-23 13:28:18 -07:00
|
|
|
{
|
|
|
|
displayName: 'Authorization URL',
|
|
|
|
name: 'authUrl',
|
2021-10-07 14:07:56 -07:00
|
|
|
type: 'hidden',
|
2021-07-23 13:28:18 -07:00
|
|
|
default: 'https://webexapis.com/v1/authorize',
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Access Token URL',
|
|
|
|
name: 'accessTokenUrl',
|
2021-10-07 14:07:56 -07:00
|
|
|
type: 'hidden',
|
2021-07-23 13:28:18 -07:00
|
|
|
default: 'https://webexapis.com/v1/access_token',
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Scope',
|
|
|
|
name: 'scope',
|
2021-10-07 14:07:56 -07:00
|
|
|
type: 'hidden',
|
2022-07-24 08:36:17 -07:00
|
|
|
default:
|
|
|
|
'spark:memberships_read meeting:recordings_read spark:kms meeting:schedules_read spark:rooms_read spark:messages_write spark:memberships_write meeting:recordings_write meeting:preferences_read spark:messages_read meeting:schedules_write',
|
2021-07-23 13:28:18 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Auth URI Query Parameters',
|
|
|
|
name: 'authQueryParameters',
|
2021-10-07 14:07:56 -07:00
|
|
|
type: 'hidden',
|
2021-07-23 13:28:18 -07:00
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Authentication',
|
|
|
|
name: 'authentication',
|
2021-10-07 14:07:56 -07:00
|
|
|
type: 'hidden',
|
2021-07-23 13:28:18 -07:00
|
|
|
default: 'body',
|
|
|
|
},
|
|
|
|
];
|
|
|
|
}
|