summaryrefslogtreecommitdiffhomepage
path: root/example/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'example/index.js')
-rw-r--r--example/index.js36
1 files changed, 8 insertions, 28 deletions
diff --git a/example/index.js b/example/index.js
index 59cb3c4..2cc3b5b 100644
--- a/example/index.js
+++ b/example/index.js
@@ -4,15 +4,12 @@
*
* The webpages served from ./public use @simplewebauthn/browser.
*/
-require('dotenv').config();
const https = require('https');
const fs = require('fs');
const express = require('express');
-// const FIDOConformanceRoutes = require('./fido-conformance');
-
const {
// Registration ("Attestation")
generateAttestationOptions,
@@ -20,39 +17,22 @@ const {
// Login ("Assertion")
generateAssertionOptions,
verifyAssertionResponse,
- // Support for FIDO MDS
- // MetadataService,
} = require('@simplewebauthn/server');
-/**
- * Initialize MetadataService to enable support for the FIDO Metadata Service (MDS).
- *
- * Metadata enables a greater degree of certainty that the devices interacting with this server are
- * what they claim to be according to their manufacturer.
- *
- * Use of MetadataService is _not_ required to use @simplewebauthn/server. If you do choose to use
- * it, you'll need to provide at least one MDS endpoint
- *
- * See https://mds2.fidoalliance.org/tokens/ to register for a free access token. When they ask for
- * an Organization Name, "Self" works just fine.
- */
-// const mdsAPIToken = process.env.MDS_API_TOKEN;
-// MetadataService.initialize({
-// mdsServers: [
-// {
-// url: `https://mds2.fidoalliance.org/?token=${mdsAPIToken}`,
-// rootCertURL: 'https://mds.fidoalliance.org/Root.cer',
-// metadataURLSuffix: `?token=${mdsAPIToken}`,
-// },
-// ],
-// });
-
const app = express();
const host = '0.0.0.0';
const port = 443;
app.use(express.static('./public/'));
app.use(express.json());
+
+/**
+ * If the words "metadata statements" mean anything to you, you'll want to check out this file. It
+ * contains an example of a more complex deployment of SimpleWebAuthn with support enabled for the
+ * FIDO Metadata Service. This enables greater control over the types of authenticators that can
+ * interact with the Rely Party (a.k.a. "RP", a.k.a. "this server").
+ */
+// const FIDOConformanceRoutes = require('./fido-conformance');
// app.use('/fido', FIDOConformanceRoutes);
/**