@routr/simpleauth 2.0.5-alpha.7 → 2.0.5-alpha.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/service.js +1 -6
  2. package/package.json +4 -4
package/dist/service.js CHANGED
@@ -30,26 +30,21 @@ function SimpleAuthProcessor(config) {
30
30
  const { bindAddr, users } = config;
31
31
  new processor_1.default({ bindAddr, name: "simpleauth" })
32
32
  .listen((req, res) => {
33
- //logger.verbose(JSON.stringify(req, null, ' '))
34
- logger_1.default.verbose("dbg000");
33
+ logger_1.default.verbose(JSON.stringify(req, null, ' '));
35
34
  // Calculate and return challenge
36
35
  if (req.message.authorization) {
37
36
  const auth = Object.assign({}, req.message.authorization);
38
37
  auth.method = req.method;
39
38
  // Calculate response and compare with the one send by the endpoint
40
39
  const calcRes = common_1.calculateAuthResponse(auth, utils_1.getCredentials(auth.username, users));
41
- logger_1.default.verbose("dbg001");
42
40
  if (calcRes !== auth.response) {
43
- logger_1.default.verbose("dbg002");
44
41
  return res.send(utils_1.createUnauthorizedResponse(auth.realm));
45
42
  }
46
43
  }
47
44
  else {
48
- logger_1.default.verbose("dbg003");
49
45
  return res.send(utils_1.createUnauthorizedResponse(req.message.requestUri.host));
50
46
  }
51
47
  // Forward request to next middleware
52
- logger_1.default.verbose("yyy" + JSON.stringify(req, null, ' '));
53
48
  res.send(req);
54
49
  });
55
50
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@routr/simpleauth",
3
- "version": "2.0.5-alpha.7",
3
+ "version": "2.0.5-alpha.8",
4
4
  "description": "This middleware delegates authentication to an external service",
5
5
  "author": "Pedro Sanders <psanders@fonoster.com>",
6
6
  "homepage": "https://github.com/fonoster/routr#readme",
@@ -20,8 +20,8 @@
20
20
  },
21
21
  "dependencies": {
22
22
  "@fonoster/logger": "^0.3.3",
23
- "@routr/common": "^2.0.5-alpha.7",
24
- "@routr/processor": "^2.0.5-alpha.7"
23
+ "@routr/common": "^2.0.5-alpha.8",
24
+ "@routr/processor": "^2.0.5-alpha.8"
25
25
  },
26
26
  "files": [
27
27
  "dist"
@@ -36,5 +36,5 @@
36
36
  "bugs": {
37
37
  "url": "https://github.com/fonoster/routr/issues"
38
38
  },
39
- "gitHead": "690b6fc677009c8c416c7c737b1cc5360b9ed7c7"
39
+ "gitHead": "e093bd9f05f7600a419f4e3d9eb41643b3682218"
40
40
  }