@riocrypto/common-server 1.0.571 → 1.0.573

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.
@@ -98,7 +98,8 @@ const authorize = (req, res, next, mongoose, authorizationTypes) => __awaiter(vo
98
98
  catch (err) { }
99
99
  }
100
100
  }
101
- if (authorizationTypes.includes(common_1.AuthorizationType.PartnerAuth)) {
101
+ if (authorizationTypes.includes(common_1.AuthorizationType.PartnerAuth) ||
102
+ authorizationTypes.includes(common_1.AuthorizationType.Partner)) {
102
103
  if ((_g = req.cookies) === null || _g === void 0 ? void 0 : _g.partnerAccessToken) {
103
104
  try {
104
105
  const PARTNER_ACCESS_TOKEN_SECRET = yield secret_manager_client_1.secretManagerClient.getSecretValue("PARTNER_ACCESS_TOKEN_SECRET");
@@ -222,12 +223,14 @@ const authorize = (req, res, next, mongoose, authorizationTypes) => __awaiter(vo
222
223
  !req.currentPartnerAuth &&
223
224
  !req.user &&
224
225
  !req.partner &&
225
- !req.validAdminApiKey) ||
226
+ !req.validAdminApiKey &&
227
+ !authorizationTypes.includes(common_1.AuthorizationType.Public)) ||
226
228
  (!req.currentAuth &&
227
229
  !authorizationTypes.includes(common_1.AuthorizationType.Auth) &&
228
230
  !req.user &&
229
231
  !req.validAdminApiKey &&
230
- !req.currentPartnerAuth)) {
232
+ !req.currentPartnerAuth &&
233
+ !authorizationTypes.includes(common_1.AuthorizationType.Public))) {
231
234
  if (!req.user &&
232
235
  authorizationTypes.includes(common_1.AuthorizationType.UserOptional)) {
233
236
  next();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common-server",
3
- "version": "1.0.571",
3
+ "version": "1.0.573",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",
@@ -23,7 +23,7 @@
23
23
  "dependencies": {
24
24
  "@aws-sdk/client-s3": "^3.297.0",
25
25
  "@google-cloud/storage": "^6.9.5",
26
- "@riocrypto/common": "^1.0.556",
26
+ "@riocrypto/common": "^1.0.557",
27
27
  "@types/express": "^4.17.13",
28
28
  "axios": "^0.27.2",
29
29
  "ccxt": "^3.0.30",