mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
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:
@@ -1,6 +1,5 @@
|
||||
import {
|
||||
IAuthenticateBearer,
|
||||
IAuthenticateQueryAuth,
|
||||
IAuthenticateGeneric,
|
||||
ICredentialTestRequest,
|
||||
ICredentialType,
|
||||
INodeProperties,
|
||||
@@ -19,12 +18,16 @@ export class SlackApi implements ICredentialType {
|
||||
required: true,
|
||||
},
|
||||
];
|
||||
authenticate: IAuthenticateBearer = {
|
||||
type: 'bearer',
|
||||
|
||||
authenticate: IAuthenticateGeneric = {
|
||||
type: 'generic',
|
||||
properties: {
|
||||
tokenPropertyName: 'accessToken',
|
||||
headers: {
|
||||
Authorization: '=Bearer {{$credentials.accessToken}}',
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
test: ICredentialTestRequest = {
|
||||
request: {
|
||||
baseURL: 'https://slack.com',
|
||||
|
||||
Reference in New Issue
Block a user