2023-07-31 01:26:38 -07:00
|
|
|
import type { IAuthenticateGeneric, ICredentialType, INodeProperties } from 'n8n-workflow';
|
|
|
|
|
|
|
|
export class FortiGateApi implements ICredentialType {
|
|
|
|
name = 'fortiGateApi';
|
|
|
|
|
|
|
|
displayName = 'Fortinet FortiGate API';
|
|
|
|
|
2023-08-09 06:16:11 -07:00
|
|
|
documentationUrl = 'fortigate';
|
|
|
|
|
2023-07-31 01:26:38 -07:00
|
|
|
icon = 'file:icons/Fortinet.svg';
|
|
|
|
|
2023-11-13 03:11:16 -08:00
|
|
|
httpRequestNode = {
|
|
|
|
name: 'Fortinet FortiGate',
|
|
|
|
docsUrl:
|
|
|
|
'https://docs.fortinet.com/document/fortigate/7.4.1/administration-guide/940602/using-apis',
|
|
|
|
apiBaseUrl: '',
|
|
|
|
};
|
|
|
|
|
2023-07-31 01:26:38 -07:00
|
|
|
properties: INodeProperties[] = [
|
|
|
|
{
|
|
|
|
displayName: 'Access Token',
|
|
|
|
name: 'accessToken',
|
|
|
|
type: 'string',
|
|
|
|
typeOptions: { password: true },
|
|
|
|
default: '',
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
];
|
|
|
|
|
|
|
|
authenticate: IAuthenticateGeneric = {
|
|
|
|
type: 'generic',
|
|
|
|
properties: {
|
|
|
|
qs: {
|
|
|
|
access_token: '={{$credentials.accessToken}}',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
}
|