2024-06-06 04:34:30 -07:00
|
|
|
import type { IAuthenticateGeneric, ICredentialType, INodeProperties, Icon } from 'n8n-workflow';
|
2023-07-31 01:26:38 -07:00
|
|
|
|
|
|
|
export class FortiGateApi implements ICredentialType {
|
|
|
|
name = 'fortiGateApi';
|
|
|
|
|
|
|
|
displayName = 'Fortinet FortiGate API';
|
|
|
|
|
2023-08-09 06:16:11 -07:00
|
|
|
documentationUrl = 'fortigate';
|
|
|
|
|
2024-06-06 04:34:30 -07:00
|
|
|
icon: Icon = 'file:icons/Fortinet.svg';
|
2023-07-31 01:26:38 -07:00
|
|
|
|
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}}',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
}
|