Conversation
- update tests
| "license": "ISC", | ||
| "dependencies": { | ||
| "@digipolis/auth": "^1.1.0", | ||
| "@digipolis/auth": "git+https://github.com/digipolisantwerp/auth_module_nodejs.git", |
There was a problem hiding this comment.
Waarom is dit niet de gepubliceerde versie?
There was a problem hiding this comment.
omdat deze versie nog niet gepublished is.
| ```js | ||
| app.use(require('@digipolis/auth')(app, configuration)); | ||
| ``` | ||
| You should use `express-session` in your application to enable session storage. |
There was a problem hiding this comment.
Misschien handig om achter express-session een linkje te leggen naar de juiste module:
https://www.npmjs.com/package/express-session
src/controller.js
Outdated
| } | ||
|
|
||
| function logout(req, res) { | ||
|
|
| } | ||
|
|
||
| async function refreshToken(req, res, next) { | ||
|
|
| ]; | ||
|
|
||
| function validateConfig(config) { | ||
|
|
test/loginCallback.js
Outdated
| }); | ||
|
|
||
| res.on('end', () => { | ||
| // assert(res.redirect.calledWith('/')); |
test/sso.js
Outdated
|
|
||
|
|
||
| describe('test sso middleware', function onDescribe() { | ||
| // nockGetSession({ssoKey: 'fakessokey', payload: emptySessions}) |
| - PORT=2000 | ||
| - MONGO_CONNECTIONSTRING=mongodb://mongo:27017/basic-mongo-auth | ||
| - CLIENT_SECRET= | ||
| - CLIENT_ID |
There was a problem hiding this comment.
Misschien handig om in te vullen met dummy code?
|
Ik zou ook node v6 uit de test-builds halen en expliciet vermelden in de README dat we dit niet meer ondersteunen. |
frankdsm
left a comment
There was a problem hiding this comment.
Only es module imports pls
src/controller.js
Outdated
| } | ||
|
|
||
| const newToken = await service.refresh(token); | ||
| req.session = Object.assign(req.session, { [tokenKey]: newToken }); |
There was a problem hiding this comment.
Rest operator can be used here
There was a problem hiding this comment.
Maakt rest operator er geen nieuw object van, ik kopieer hier de property op de req.session
Misschien is de assignment dan niet echt nodig.
| export function getHost(req) { | ||
| return `${req.protocol}://${req.get('host')}` | ||
| } | ||
|
|
There was a problem hiding this comment.
Check for new lines with eslint
test/isLoggedin.js
Outdated
| const user = require('./mocks/user.json'); | ||
|
|
||
| describe('test #isLoggedin', function onDescribe() { | ||
| describe('GET /isLoggedin', function onDescribe() { |
| mongoConnectionString, | ||
| port = 2000 | ||
| } = require('./config'); | ||
| } = require('./old-config'); |
There was a problem hiding this comment.
Why does te example use an old config ?
package.json
Outdated
| "@babel/core": "^7.8.4", | ||
| "@babel/preset-env": "^7.8.4", | ||
| "@babel/register": "^7.8.3", | ||
| "@istanbuljs/nyc-config-babel": "^3.0.0", | ||
| "@rollup/plugin-node-resolve": "^7.1.1", | ||
| "babel-plugin-istanbul": "^6.0.0", |
There was a problem hiding this comment.
Is there a reason to add babel to this?
I see a target to node 8 however i would tend to target the latest lts versions for new modules.
node 8 is passed its lifetime anyway.
* Use default authentication method in SSO redirect URL for low sessions * Fix typo in loop while searching for highest assurance level * Remove node 8 from travis config
…ation-method Fix naming of authentication method param during logout
Bug/acapp 434
chore/maintenance
…e-na-auth ASTAD-28445 Open redirect issue na auth
…e-na-auth ASTAD-28445 open redirect issue na auth
Add crash handler to failed refresh calls and additional error logging
No description provided.