Full codebase including API server (32 modules + routes), dashboard frontend, DashCA certificate distribution, installer script, and deployment skills.
18 lines
495 B
JavaScript
18 lines
495 B
JavaScript
const express = require('express');
|
|
const initTotp = require('./totp');
|
|
const initKeys = require('./keys');
|
|
const initSessionHandlers = require('./session-handlers');
|
|
const initSsoGate = require('./sso-gate');
|
|
|
|
module.exports = function(ctx) {
|
|
const router = express.Router();
|
|
|
|
const { getAppSession, appSessionCache } = initSessionHandlers(ctx);
|
|
|
|
router.use(initTotp(ctx));
|
|
router.use(initKeys(ctx));
|
|
router.use(initSsoGate(ctx, getAppSession, appSessionCache));
|
|
|
|
return router;
|
|
};
|