Archived
1
0

Delegate authentication to plugins

Unfortunately since plugins can now override the root this is necessary
or just can't log in.
This commit is contained in:
Asher
2021-02-12 16:49:47 -06:00
parent c2450d6bf3
commit 3fc556d4d5
2 changed files with 17 additions and 5 deletions

View File

@ -142,6 +142,16 @@ export { field, Level, Logger }
*/
export const proxy: ProxyServer
/**
* Middleware to ensure the user is authenticated. Throws if they are not.
*/
export function ensureAuthenticated(req: express.Request, res?: express.Response, next?: express.NextFunction): void
/**
* Returns true if the user is authenticated.
*/
export function authenticated(req: express.Request): boolean
/**
* Replace variables in HTML: TO, BASE, CS_STATIC_BASE, and OPTIONS.
*/