2023-01-27 03:22:44 -08:00
|
|
|
import type {
|
2022-10-07 06:10:02 -07:00
|
|
|
IAuthenticateGeneric,
|
|
|
|
ICredentialTestRequest,
|
|
|
|
ICredentialType,
|
|
|
|
INodeProperties,
|
|
|
|
} from 'n8n-workflow';
|
|
|
|
|
|
|
|
export class CitrixAdcApi implements ICredentialType {
|
|
|
|
name = 'citrixAdcApi';
|
2022-12-02 12:54:28 -08:00
|
|
|
|
2022-10-07 06:10:02 -07:00
|
|
|
displayName = 'Citrix ADC API';
|
2022-12-02 12:54:28 -08:00
|
|
|
|
2022-12-22 08:01:29 -08:00
|
|
|
documentationUrl = 'citrixadc';
|
2022-12-02 12:54:28 -08:00
|
|
|
|
2022-10-07 06:10:02 -07:00
|
|
|
properties: INodeProperties[] = [
|
|
|
|
{
|
|
|
|
displayName: 'URL',
|
|
|
|
name: 'url',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Username',
|
|
|
|
name: 'username',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Password',
|
|
|
|
name: 'password',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
required: true,
|
|
|
|
typeOptions: {
|
|
|
|
password: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
];
|
|
|
|
|
|
|
|
authenticate: IAuthenticateGeneric = {
|
|
|
|
type: 'generic',
|
|
|
|
properties: {
|
|
|
|
headers: {
|
|
|
|
'X-NITRO-USER': '={{$credentials.username}}',
|
|
|
|
'X-NITRO-PASS': '={{$credentials.password}}',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
test: ICredentialTestRequest = {
|
|
|
|
request: {
|
|
|
|
baseURL: '={{$credentials.url}}',
|
|
|
|
url: '/nitro/v1/config/nspartition?view=summary',
|
|
|
|
},
|
|
|
|
};
|
|
|
|
}
|