mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-15 17:14:05 -08:00
56 lines
1,022 B
TypeScript
56 lines
1,022 B
TypeScript
|
import {
|
||
|
IAuthenticateGeneric,
|
||
|
ICredentialTestRequest,
|
||
|
ICredentialType,
|
||
|
INodeProperties,
|
||
|
} from 'n8n-workflow';
|
||
|
|
||
|
export class CitrixAdcApi implements ICredentialType {
|
||
|
name = 'citrixAdcApi';
|
||
|
displayName = 'Citrix ADC API';
|
||
|
documentationUrl = 'citrix';
|
||
|
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',
|
||
|
},
|
||
|
};
|
||
|
}
|