mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
feat(core): Credentials for popular SecOps services, Part 1 (#6775)
This commit is contained in:
41
packages/nodes-base/credentials/VirusTotalApi.credentials.ts
Normal file
41
packages/nodes-base/credentials/VirusTotalApi.credentials.ts
Normal file
@@ -0,0 +1,41 @@
|
||||
import type {
|
||||
IAuthenticateGeneric,
|
||||
ICredentialTestRequest,
|
||||
ICredentialType,
|
||||
INodeProperties,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
export class VirusTotalApi implements ICredentialType {
|
||||
name = 'virusTotalApi';
|
||||
|
||||
displayName = 'Virus Total API';
|
||||
|
||||
icon = 'file:icons/VirusTotal.svg';
|
||||
|
||||
properties: INodeProperties[] = [
|
||||
{
|
||||
displayName: 'API Token',
|
||||
name: 'accessToken',
|
||||
type: 'string',
|
||||
typeOptions: { password: true },
|
||||
required: true,
|
||||
default: '',
|
||||
},
|
||||
];
|
||||
|
||||
authenticate: IAuthenticateGeneric = {
|
||||
type: 'generic',
|
||||
properties: {
|
||||
headers: {
|
||||
'x-apikey': '={{$credentials.accessToken}}',
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
test: ICredentialTestRequest = {
|
||||
request: {
|
||||
baseURL: 'https://www.virustotal.com/api/v3',
|
||||
url: '/popular_threat_categories',
|
||||
},
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user