blob: e4fbd69c9f92deba7d8ab126c25308b8bc9d33e6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
import dotenv from 'dotenv';
dotenv.config();
const { ENABLE_MDS, MDS_API_TOKEN, MDS_TOC_URL, MDS_ROOT_CERT_URL } = process.env;
/**
* Supported environment variables:
*
* @prop `ENABLE_MDS`: Enable support for the FIDO Metadata Service API
* @prop `MDS_API_TOKEN`: FIDO Metadata Service API token (see https://fidoalliance.org/metadata/)
* @prop `MDS_TOC_URL`: Alternative URL to the FIDO Metadata Service TOC endpoint (defaults to
* https://mds2.fidoalliance.org/)
* @prop `MDS_ROOT_CERT_URL`: URL to root certificate for completing certificate chains
*/
export const ENV_VARS = {
ENABLE_MDS: ENABLE_MDS === 'true' ? true : false,
MDS_API_TOKEN: MDS_API_TOKEN || '',
MDS_TOC_URL: MDS_TOC_URL || 'https://mds2.fidoalliance.org/',
MDS_ROOT_CERT_URL: MDS_ROOT_CERT_URL || 'https://mds.fidoalliance.org/Root.cer',
};
|