-
Notifications
You must be signed in to change notification settings - Fork 7
/
authentication.js
38 lines (37 loc) · 1.2 KB
/
authentication.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
module.exports = {
type: 'custom',
connectionLabel: '{{server_url}}',
test: {
url: '{{bundle.authData.server_url}}/api/v1/server/info',
method: 'GET',
params: {
},
headers: {
Authorization: 'token {{bundle.authData.api_key}}'
},
body: {},
removeMissingValuesFrom: {},
// TODO validate the API key. Does it have all the Store ID permissions? Nothing more? Nothing less?
},
fields: [
{
computed: false,
key: 'server_url',
required: true,
label: 'BTCPay Server URL',
type: 'string',
helpText: 'Enter your BTCPay Server URL.',
default: 'https://mybtcpay.com',
},
{
computed: false,
key: 'api_key',
required: true,
label: 'API Key',
type: 'string',
helpText: 'You can create an API key by going to **My Account > API Keys** in BTCPay Server. \n' +
'[Learn more about selecting the right permissions.](https://github.com/btcpayserver/zapier#which-permissions-should-i-choose-for-my-api-key)',
}
],
customConfig: {},
};