MCPcopy Index your code
hub / github.com/nodeSolidServer/node-solid-server / initAuthentication

Function initAuthentication

lib/create-app.mjs:334–340  ·  view source on GitHub ↗

* Sets up authentication-related routes and handlers for the app. * * @param app {Object} Express.js app instance * @param argv {Object} Config options hashmap * @return {Promise} Resolves when authentication initialization is complete

(app, argv)

Source from the content-addressed store, hash-verified

332 * @return {Promise} Resolves when authentication initialization is complete
333 */
334async function initAuthentication (app, argv) {
335 const auth = argv.forceUser ? 'forceUser' : argv.auth
336 if (!(auth in API.authn)) {
337 throw new Error(`Unsupported authentication scheme: ${auth}`)
338 }
339 await API.authn[auth].initialize(app, argv)
340}
341
342/**
343 * Returns a settings object for Express.js sessions.

Callers 1

initWebIdFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected