2021-04-16 04:59:44 -06:00
|
|
|
/*
|
|
|
|
Copyright 2021 Yarmo Mackenbach
|
|
|
|
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
you may not use this file except in compliance with the License.
|
|
|
|
You may obtain a copy of the License at
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
limitations under the License.
|
|
|
|
*/
|
2021-04-16 05:09:43 -06:00
|
|
|
const E = require('./enums')
|
|
|
|
|
2021-04-22 07:14:21 -06:00
|
|
|
/**
|
|
|
|
* Contains default values
|
|
|
|
* @module defaults
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The default options used throughout the library
|
|
|
|
* @constant {object}
|
|
|
|
* @property {object} proxy - Options related to the proxy
|
|
|
|
* @property {string|null} proxy.hostname - The hostname of the proxy
|
|
|
|
* @property {string} proxy.policy - The policy that defines when to use a proxy ({@link module:enums~ProxyPolicy|here})
|
|
|
|
* @property {object} claims - Options related to claim verification
|
2022-10-27 13:47:41 -06:00
|
|
|
* @property {object} claims.activitypub - Options related to the verification of activitypub claims
|
|
|
|
* @property {string|null} claims.activitypub.url - The URL of the verifier account
|
|
|
|
* @property {string|null} claims.activitypub.privateKey - The private key to sign the request
|
2021-04-22 07:14:21 -06:00
|
|
|
* @property {object} claims.irc - Options related to the verification of IRC claims
|
|
|
|
* @property {string|null} claims.irc.nick - The nick that the library uses to connect to the IRC server
|
|
|
|
* @property {object} claims.matrix - Options related to the verification of Matrix claims
|
|
|
|
* @property {string|null} claims.matrix.instance - The server hostname on which the library can log in
|
|
|
|
* @property {string|null} claims.matrix.accessToken - The access token required to identify the library ({@link https://www.matrix.org/docs/guides/client-server-api|Matrix docs})
|
2022-10-27 13:47:41 -06:00
|
|
|
* @property {object} claims.telegram - Options related to the verification of Telegram claims
|
|
|
|
* @property {string|null} claims.telegram.token - The Telegram API's token ({@link https://core.telegram.org/bots/api#authorizing-your-bot|Telegram docs})
|
|
|
|
* @property {object} claims.twitter - Options related to the verification of Twitter claims
|
|
|
|
* @property {string|null} claims.twitter.bearerToken - The Twitter API's bearer token ({@link https://developer.twitter.com/en/docs/authentication/oauth-2-0/bearer-tokens|Twitter docs})
|
2021-04-22 07:14:21 -06:00
|
|
|
* @property {object} claims.xmpp - Options related to the verification of XMPP claims
|
|
|
|
* @property {string|null} claims.xmpp.service - The server hostname on which the library can log in
|
|
|
|
* @property {string|null} claims.xmpp.username - The username used to log in
|
|
|
|
* @property {string|null} claims.xmpp.password - The password used to log in
|
|
|
|
*/
|
2021-04-19 03:44:30 -06:00
|
|
|
const opts = {
|
2021-04-16 04:59:44 -06:00
|
|
|
proxy: {
|
|
|
|
hostname: null,
|
2021-07-09 15:44:52 -06:00
|
|
|
policy: E.ProxyPolicy.NEVER
|
2021-04-16 04:59:44 -06:00
|
|
|
},
|
|
|
|
claims: {
|
2022-10-27 13:47:41 -06:00
|
|
|
activitypub: {
|
|
|
|
url: null,
|
|
|
|
privateKey: null
|
|
|
|
},
|
2021-04-16 04:59:44 -06:00
|
|
|
irc: {
|
2021-07-09 15:44:52 -06:00
|
|
|
nick: null
|
2021-04-16 04:59:44 -06:00
|
|
|
},
|
|
|
|
matrix: {
|
|
|
|
instance: null,
|
2021-07-09 15:44:52 -06:00
|
|
|
accessToken: null
|
2021-04-16 04:59:44 -06:00
|
|
|
},
|
2022-10-27 13:47:41 -06:00
|
|
|
telegram: {
|
|
|
|
token: null
|
2021-04-16 04:59:44 -06:00
|
|
|
},
|
|
|
|
twitter: {
|
2021-07-09 15:44:52 -06:00
|
|
|
bearerToken: null
|
2022-10-01 01:57:58 -06:00
|
|
|
},
|
2022-10-27 13:47:41 -06:00
|
|
|
xmpp: {
|
|
|
|
service: null,
|
|
|
|
username: null,
|
|
|
|
password: null
|
2021-07-09 15:44:52 -06:00
|
|
|
}
|
|
|
|
}
|
2021-04-16 04:59:44 -06:00
|
|
|
}
|
|
|
|
|
2021-04-19 03:44:30 -06:00
|
|
|
exports.opts = opts
|