mirror of
https://github.com/0rangebananaspy/authelia.git
synced 2024-09-14 22:47:21 +07:00
Reconnect to LDAP when connection is closed (or not open at the beginning)
This commit is contained in:
parent
dc7b554c8d
commit
ccbcb758f0
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -5,3 +5,4 @@ coverage/
|
|||
|
||||
*.swp
|
||||
|
||||
*.sh
|
||||
|
|
|
@ -7,5 +7,4 @@ RUN npm install
|
|||
|
||||
COPY src /usr/src
|
||||
|
||||
|
||||
CMD ["node", "index.js"]
|
||||
|
|
|
@ -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);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user