feat(Jira Software Node): Personal Access Token credential type (#11038)

This commit is contained in:
Gerard de Vries
2025-01-22 12:43:13 +01:00
committed by GitHub
parent 69c2153279
commit 1c7a38f6ba
5 changed files with 92 additions and 11 deletions

View File

@@ -0,0 +1,47 @@
import type {
IAuthenticateGeneric,
ICredentialTestRequest,
ICredentialType,
INodeProperties,
} from 'n8n-workflow';
export class JiraSoftwareServerPatApi implements ICredentialType {
name = 'jiraSoftwareServerPatApi';
displayName = 'Jira SW Server (PAT) API';
documentationUrl = 'jira';
properties: INodeProperties[] = [
{
displayName: 'Personal Access Token',
name: 'personalAccessToken',
typeOptions: { password: true },
type: 'string',
default: '',
},
{
displayName: 'Domain',
name: 'domain',
type: 'string',
default: '',
placeholder: 'https://example.com',
},
];
authenticate: IAuthenticateGeneric = {
type: 'generic',
properties: {
headers: {
Authorization: '=Bearer {{$credentials.personalAccessToken}}',
},
},
};
test: ICredentialTestRequest = {
request: {
baseURL: '={{$credentials?.domain}}',
url: '/rest/api/2/project',
},
};
}