@lucaapp/service-utils 1.40.1 → 1.40.3

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.
@@ -53,11 +53,11 @@ declare class ServiceIdentity {
53
53
  error: import("../api/types/http").HTTPStatus.FORBIDDEN;
54
54
  }>;
55
55
  })[], undefined, undefined, undefined, z.ZodObject<{
56
- 'X-Identity': z.ZodEffects<z.ZodString, string, string>;
56
+ 'x-identity': z.ZodEffects<z.ZodString, string, string>;
57
57
  }, "strip", z.ZodTypeAny, {
58
- "X-Identity": string;
58
+ "x-identity": string;
59
59
  }, {
60
- "X-Identity": string;
60
+ "x-identity": string;
61
61
  }>, z.ZodObject<{
62
62
  payload: z.ZodAny;
63
63
  }, "strip", z.ZodTypeAny, {
@@ -37,7 +37,7 @@ const axios_1 = __importDefault(require("axios"));
37
37
  const zod_1 = require("zod");
38
38
  const validator_1 = __importDefault(require("validator"));
39
39
  const JWT_ALGORITHM = 'ES256';
40
- const JWT_HEADER_NAME = 'X-Identity';
40
+ const JWT_HEADER_NAME = 'x-identity';
41
41
  const JWT_ALLOWED_ALGORITHMS = [JWT_ALGORITHM];
42
42
  const JWT_NBF = '0s';
43
43
  const JWT_EXP = '1m';
@@ -129,7 +129,7 @@ class ServiceIdentity {
129
129
  this.requireServiceIdentityV3 = (service) => (0, api_1.createMiddleware)({
130
130
  schemas: {
131
131
  headers: zod_1.z.object({
132
- 'X-Identity': zod_1.z.string().refine(value => validator_1.default.isJWT(value)),
132
+ 'x-identity': zod_1.z.string().refine(value => validator_1.default.isJWT(value)),
133
133
  }),
134
134
  context: zod_1.z.object({ payload: zod_1.z.any() }),
135
135
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lucaapp/service-utils",
3
- "version": "1.40.1",
3
+ "version": "1.40.3",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [