(req, res)
| 44 | } |
| 45 | |
| 46 | static requestOptions (req, res) { |
| 47 | let userStore, accountManager, localAuth |
| 48 | if (req.app && req.app.locals) { |
| 49 | const locals = req.app.locals |
| 50 | if (locals.oidc) { |
| 51 | userStore = locals.oidc.users |
| 52 | } |
| 53 | accountManager = locals.accountManager |
| 54 | localAuth = locals.localAuth |
| 55 | } |
| 56 | const authQueryParams = AuthRequest.extractAuthParams(req) |
| 57 | const returnToUrl = AuthRequest.parseParameter(req, 'returnToUrl') |
| 58 | const acceptToc = AuthRequest.parseParameter(req, 'acceptToc') === 'true' |
| 59 | const options = { |
| 60 | response: res, |
| 61 | session: req.session, |
| 62 | userStore, |
| 63 | accountManager, |
| 64 | returnToUrl, |
| 65 | authQueryParams, |
| 66 | localAuth, |
| 67 | acceptToc |
| 68 | } |
| 69 | return options |
| 70 | } |
| 71 | |
| 72 | static extractAuthParams (req) { |
| 73 | let params |
no test coverage detected