@@ -260,7 +260,7 @@ function repliquerTOLModulable(data, return_attributes) {
...
@@ -260,7 +260,7 @@ function repliquerTOLModulable(data, return_attributes) {
* @return {Promise(Object[])} Liste de dictionnaires de profils en cohérence avec l'input avec pour clés tous les attributs disponibles ou presque (voir config).
* @return {Promise(Object[])} Liste de dictionnaires de profils en cohérence avec l'input avec pour clés tous les attributs disponibles ou presque (voir config).
// WTF??? why is sessionSecret in ldap_config.json? it has nothing to do with ldap. TODO
// 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)
// 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)
// 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...)
// 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({
app.use(session({
secret:config.sessionSecret,
secret:ldapConfig.sessionSecret,
resave:true,
resave:true,
saveUninitialized:false,
saveUninitialized:false,
//store: // TODO: change this. express-session doc warns that default value is ok to use for development only
//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',
...
@@ -203,8 +204,6 @@ app.post('/login',
/**
/**
* @desc API GRAPHQL
* @desc API GRAPHQL
*/
*/
import{dn,passwd}from"../ldap_connexion_config.json";// default bind user