feat(core) Simplify authentication type (#3578)

*  Add generic auth type

*  Remove queryAuth

*  Remove bearer

*  Remove headerAuth

*  Remove basicAuth

*  Adjust tests

*  Small improvements

* 👕 Fix lint issue
This commit is contained in:
Jan Oberhauser
2022-06-26 15:55:51 -07:00
committed by GitHub
parent 1e4fd9e4df
commit 86721fc496
15 changed files with 207 additions and 281 deletions

View File

@@ -1,6 +1,5 @@
import {
IAuthenticateQueryAuth,
ICredentialTestRequest,
IAuthenticateGeneric,
ICredentialType,
INodeProperties,
} from 'n8n-workflow';
@@ -19,11 +18,12 @@ export class PipedriveApi implements ICredentialType {
},
];
authenticate = {
type: 'queryAuth',
authenticate: IAuthenticateGeneric = {
type: 'generic',
properties: {
key: 'api_token',
value: '={{$credentials.apiToken}}',
qs: {
api_token: '={{$credentials.apiToken}}',
},
},
} as IAuthenticateQueryAuth;
};
}