mirror of
https://github.com/authelia/authelia.git
synced 2026-10-28 09:34:52 +08:00
Reconnect to LDAP when connection is closed (or not open at the beginning)
This commit is contained in:
1 parent
dc7b554c8d
commit
ccbcb758f0
6 files changed
+6
-5
No files matched your search
@@ -5,3 +5,4 @@ coverage/
|
||||
|
||||
*.swp
|
||||
|
||||
*.sh
|
||||
@@ -7,5 +7,4 @@ RUN npm install
|
||||
|
||||
COPY src /usr/src
|
||||
|
||||
|
||||
CMD ["node", "index.js"]
|
||||
+2
-2
@@ -13,8 +13,8 @@ var config = {
|
||||
}
|
||||
|
||||
var ldap_client = ldap.createClient({
|
||||
url: config.ldap_url
|
||||
url: config.ldap_url,
|
||||
reconnect: true
|
||||
});
|
||||
|
||||
server.run(config, ldap_client);
|
||||
|
||||
@@ -49,7 +49,6 @@ function authenticate(req, res) {
|
||||
|
||||
function verify_authentication(req, res) {
|
||||
console.log('Verify authentication');
|
||||
console.log(req.cookies);
|
||||
|
||||
if(!objectPath.has(req, 'cookies.access_token')) {
|
||||
return utils.reject('No access token provided');
|
||||
|
||||
@@ -33,7 +33,6 @@ function serveAuthPost(req, res) {
|
||||
}
|
||||
|
||||
function serveLogin(req, res) {
|
||||
console.log(req.headers);
|
||||
res.render('login');
|
||||
}
|
||||
|
||||
|
||||
@@ -107,6 +107,9 @@ describe('test the server', function() {
|
||||
(content.indexOf('This is a very important secret!') > -1);
|
||||
assert(is_secret_page_content);
|
||||
done();
|
||||
})
|
||||
.fail(function(err) {
|
||||
console.error(err);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user