// WTF??? why is sessionSecret in ldap_config.json? it has nothing to do with ldap. TODO
// defines parameters for *session store*. (adds field req.session and do some magic stuff)
// basically, searches for a session matching the received cookie and, if found, adds field req.blasomethingbla containing serialized object representing user (i.e. similar to what passport.serializeUser() could produce)
// TODO: it is important to configure this right!!! please check out https://www.npmjs.com/package/express-session and make sure you understand the way session is stored. (en vrai c'est vraiment important...)
app.use(session({
secret:config.sessionSecret,
secret:ldapConfig.sessionSecret,
resave:true,
saveUninitialized:false,
//store: // TODO: change this. express-session doc warns that default value is ok to use for development only
...
...
@@ -203,8 +204,6 @@ app.post('/login',
/**
* @desc API GRAPHQL
*/
import{dn,passwd}from"../ldap_connexion_config.json";// default bind user