n8n/packages/nodes-base/credentials/HttpCustomAuth.credentials.ts
Guillaume Jacquart d36cfa1624
feat(core): Improve custom auth JSON masking, preserve shape, redact leaf values (#27675)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-01 12:24:21 +00:00

32 lines
826 B
TypeScript

/* eslint-disable n8n-nodes-base/cred-class-field-name-unsuffixed */
/* eslint-disable n8n-nodes-base/cred-class-name-unsuffixed */
import type { ICredentialType, INodeProperties, Icon } from 'n8n-workflow';
export class HttpCustomAuth implements ICredentialType {
name = 'httpCustomAuth';
displayName = 'Custom Auth';
documentationUrl = 'httprequest';
genericAuth = true;
icon: Icon = 'node:n8n-nodes-base.httpRequest';
properties: INodeProperties[] = [
{
displayName: 'JSON',
name: 'json',
type: 'json',
required: true,
description: 'Use json to specify authentication values for headers, body and qs.',
placeholder:
'{ "headers": { "key" : "value" }, "body": { "key": "value" }, "qs": { "key": "value" } }',
default: '',
typeOptions: {
redactJsonLeaves: true,
},
},
];
}