@routr/simpleauth 2.0.5-alpha.6 → 2.0.5-alpha.9

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.
package/dist/runner.js CHANGED
@@ -30,7 +30,7 @@ if (!process.env.PATH_TO_AUTH) {
30
30
  }
31
31
  try {
32
32
  const users = require(process.env.PATH_TO_AUTH);
33
- service_1.default({ bindAddr: "", users });
33
+ service_1.default({ bindAddr: process.env.BIND_ADDR || "0.0.0.0:51903", users });
34
34
  }
35
35
  catch (e) {
36
36
  if (e.code === "MODULE_NOT_FOUND") {
package/dist/service.js CHANGED
@@ -42,7 +42,7 @@ function SimpleAuthProcessor(config) {
42
42
  }
43
43
  }
44
44
  else {
45
- return res.send(utils_1.createUnauthorizedResponse(req.message.request_uri.host));
45
+ return res.send(utils_1.createUnauthorizedResponse(req.message.requestUri.host));
46
46
  }
47
47
  // Forward request to next middleware
48
48
  res.send(req);
package/dist/utils.d.ts CHANGED
@@ -5,8 +5,8 @@ export declare const createUnauthorizedResponse: (realm: string, params?: {
5
5
  algorithm: string;
6
6
  }) => {
7
7
  message: {
8
- response_type: number;
9
- www_authenticate: {
8
+ responseType: number;
9
+ wwwAuthenticate: {
10
10
  scheme: string;
11
11
  realm: string;
12
12
  qop: string;
package/dist/utils.js CHANGED
@@ -26,8 +26,8 @@ const createUnauthorizedResponse = (realm, params = { qop: "auth", algorithm: "M
26
26
  return {
27
27
  message: {
28
28
  // UNAUTHORIZED CODE
29
- response_type: 17,
30
- www_authenticate: {
29
+ responseType: 17,
30
+ wwwAuthenticate: {
31
31
  scheme: 'Digest',
32
32
  realm: realm,
33
33
  qop: params.qop,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@routr/simpleauth",
3
- "version": "2.0.5-alpha.6",
3
+ "version": "2.0.5-alpha.9",
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.6",
24
- "@routr/processor": "^2.0.5-alpha.6"
23
+ "@routr/common": "^2.0.5-alpha.9",
24
+ "@routr/processor": "^2.0.5-alpha.9"
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": "ac4963e735fbc4ad3045379463796137e650509c"
39
+ "gitHead": "9eeafebb3f16625aca520268ed6f44896656f3a6"
40
40
  }