(req: Request, res: Response, next: NextFunction)
| 98 | } |
| 99 | |
| 100 | const ssoSuccess = async (req: Request, res: Response, next: NextFunction) => { |
| 101 | try { |
| 102 | const appServer = getRunningExpressApp() |
| 103 | const ssoToken = req.query.token as string |
| 104 | const user = await appServer.cachePool.getSSOTokenCache(ssoToken) |
| 105 | if (!user) return res.status(401).json({ message: 'Invalid or expired SSO token' }) |
| 106 | await appServer.cachePool.deleteSSOTokenCache(ssoToken) |
| 107 | return res.json(user) |
| 108 | } catch (error) { |
| 109 | next(error) |
| 110 | } |
| 111 | } |
| 112 | export default { |
| 113 | getAllPermissions, |
| 114 | ssoSuccess |
nothing calls this directly
no test coverage detected