2022-10-07 06:48:45 -07:00
|
|
|
import {
|
|
|
|
IAuthenticateGeneric,
|
|
|
|
ICredentialTestRequest,
|
|
|
|
ICredentialType,
|
|
|
|
NodePropertyTypes,
|
|
|
|
} from 'n8n-workflow';
|
|
|
|
|
|
|
|
export class VenafiTlsProtectCloudApi implements ICredentialType {
|
|
|
|
name = 'venafiTlsProtectCloudApi';
|
2022-12-02 12:54:28 -08:00
|
|
|
|
2022-10-07 06:48:45 -07:00
|
|
|
displayName = 'Venafi TLS Protect Cloud';
|
2022-12-02 12:54:28 -08:00
|
|
|
|
2022-10-07 06:48:45 -07:00
|
|
|
properties = [
|
|
|
|
{
|
|
|
|
displayName: 'API Key',
|
|
|
|
name: 'apiKey',
|
|
|
|
type: 'string' as NodePropertyTypes,
|
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
];
|
2022-12-02 12:54:28 -08:00
|
|
|
|
2022-10-07 06:48:45 -07:00
|
|
|
authenticate: IAuthenticateGeneric = {
|
|
|
|
type: 'generic',
|
|
|
|
properties: {
|
|
|
|
headers: {
|
|
|
|
'tppl-api-key': '={{$credentials.apiKey}}',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
2022-12-02 12:54:28 -08:00
|
|
|
|
2022-10-07 06:48:45 -07:00
|
|
|
test: ICredentialTestRequest = {
|
|
|
|
request: {
|
|
|
|
baseURL: 'https://api.venafi.cloud',
|
|
|
|
url: '/v1/preferences',
|
|
|
|
},
|
|
|
|
};
|
|
|
|
}
|