@otters.ai/common-backend 1.0.198 → 1.0.200

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.
@@ -0,0 +1 @@
1
+ export declare const jwtPubic = "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA89oxYqNXmTPUD04lllI2\nGqzKloPZXcqOgLLRCOh2DsY8IBHkaal5wkZ6noudXprVV/Xv+jdt2itmkSPSYAv+\nxpICp9AN0BV86iRlQZysXlcHu3tzK4N3H45DbcQN+sRpR6GeCsGuwX4KyAXkNnPn\nKuCMvUoMIm2BSxywxHE8ms+FGgcQowd8KOX6dlv3tbWsuD3ZH7AMJKkfc9zOnPWr\nqE7MXiUQYffATx/KH/0vhJCiUGhZjG7OyGU9feF79+zqiuPcPTrDTHxp+DqyY3my\niFw1BleIfZmX89g05KyT6ZuSftTgg/Ka3yPvi2z8RrtAy0QpxqoyVkqjASokqil1\nzwIDAQAB\n-----END PUBLIC KEY-----";
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.jwtPubic = void 0;
4
+ exports.jwtPubic = `-----BEGIN PUBLIC KEY-----
5
+ MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA89oxYqNXmTPUD04lllI2
6
+ GqzKloPZXcqOgLLRCOh2DsY8IBHkaal5wkZ6noudXprVV/Xv+jdt2itmkSPSYAv+
7
+ xpICp9AN0BV86iRlQZysXlcHu3tzK4N3H45DbcQN+sRpR6GeCsGuwX4KyAXkNnPn
8
+ KuCMvUoMIm2BSxywxHE8ms+FGgcQowd8KOX6dlv3tbWsuD3ZH7AMJKkfc9zOnPWr
9
+ qE7MXiUQYffATx/KH/0vhJCiUGhZjG7OyGU9feF79+zqiuPcPTrDTHxp+DqyY3my
10
+ iFw1BleIfZmX89g05KyT6ZuSftTgg/Ka3yPvi2z8RrtAy0QpxqoyVkqjASokqil1
11
+ zwIDAQAB
12
+ -----END PUBLIC KEY-----`;
@@ -5,12 +5,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.JwtService = void 0;
7
7
  const jsonwebtoken_1 = __importDefault(require("jsonwebtoken"));
8
- const fs_1 = __importDefault(require("fs"));
9
- const PUBLIC_KEY = fs_1.default.readFileSync("../secrets/jwt-public.pem");
8
+ const public_1 = require("../secrets/public");
10
9
  class JwtService {
11
10
  static verifyJSONToken(filters) {
12
11
  try {
13
- let verify = jsonwebtoken_1.default.verify(filters.token, PUBLIC_KEY, {
12
+ let verify = jsonwebtoken_1.default.verify(filters.token, public_1.jwtPubic, {
14
13
  algorithms: ["RS256"],
15
14
  issuer: "auth.otters.ai",
16
15
  audience: "otters-api",
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "@otters.ai/common-backend",
3
- "version": "1.0.198",
3
+ "version": "1.0.200",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",
7
7
  "files": [
8
- "build/**/*"
8
+ "build/**/*",
9
+ "secrets/**/*"
9
10
  ],
10
11
  "scripts": {
11
12
  "clean": "del ./build/*",