Refactor authentication code; add OIDC support

This commit is contained in:
yu-i-i
2025-11-12 02:00:01 +01:00
parent aea0b82aa5
commit 1720ffbb43
48 changed files with 1169 additions and 606 deletions
@@ -115,9 +115,9 @@ export default async function (webRouter, privateApiRouter, publicApiRouter) {
webRouter.use(function (req, res, next) {
req.externalAuthenticationSystemUsed =
Features.externalAuthenticationSystemUsed
() => !!req?.user?.externalAuth
res.locals.externalAuthenticationSystemUsed =
Features.externalAuthenticationSystemUsed
() => !!req?.user?.externalAuth
req.hasFeature = res.locals.hasFeature = Features.hasFeature
next()
})