credentials update

This commit is contained in:
Michael Kret
2022-05-31 10:46:20 +03:00
parent e6fef4b494
commit 2ca27006fd
3 changed files with 21 additions and 54 deletions

View File

@@ -1,4 +1,6 @@
import {
IAuthenticateHeaderAuth,
ICredentialTestRequest,
ICredentialType,
INodeProperties,
} from 'n8n-workflow';
@@ -28,4 +30,18 @@ export class GithubApi implements ICredentialType {
default: '',
},
];
authenticate: IAuthenticateHeaderAuth = {
type: 'headerAuth',
properties: {
name: 'Authorization',
value: '=token {{$credentials?.accessToken}}',
},
};
test: ICredentialTestRequest = {
request: {
baseURL: '={{$credentials?.server}}',
url: '/user',
method: 'GET',
},
};
}