|
|
@@ -174,12 +174,15 @@ module.exports = function(crowi, app) {
|
|
|
return res.json({
|
|
|
status: 'warning',
|
|
|
message: 'LDAP Server Error occured.',
|
|
|
+ err
|
|
|
});
|
|
|
}
|
|
|
if (info && info.message) {
|
|
|
return res.json({
|
|
|
status: 'warning',
|
|
|
message: info.message,
|
|
|
+ ldapConfiguration: req.ldapConfiguration,
|
|
|
+ ldapAccountInfo: req.ldapAccountInfo,
|
|
|
});
|
|
|
}
|
|
|
if (user) {
|
|
|
@@ -188,11 +191,15 @@ module.exports = function(crowi, app) {
|
|
|
return res.json({
|
|
|
status: 'warning',
|
|
|
message: 'The user is found, but that has no groups.',
|
|
|
+ ldapConfiguration: req.ldapConfiguration,
|
|
|
+ ldapAccountInfo: req.ldapAccountInfo,
|
|
|
});
|
|
|
}
|
|
|
return res.json({
|
|
|
status: 'success',
|
|
|
message: 'Successfully authenticated.',
|
|
|
+ ldapConfiguration: req.ldapConfiguration,
|
|
|
+ ldapAccountInfo: req.ldapAccountInfo,
|
|
|
});
|
|
|
}
|
|
|
})(req, res, () => {});
|