@riocrypto/common-server 1.0.569 → 1.0.571
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,7 @@ const authorize = (req, res, next, mongoose, authorizationTypes) => __awaiter(vo
|
|
|
98
98
|
catch (err) { }
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
|
-
if (authorizationTypes.includes(common_1.AuthorizationType.
|
|
101
|
+
if (authorizationTypes.includes(common_1.AuthorizationType.PartnerAuth)) {
|
|
102
102
|
if ((_g = req.cookies) === null || _g === void 0 ? void 0 : _g.partnerAccessToken) {
|
|
103
103
|
try {
|
|
104
104
|
const PARTNER_ACCESS_TOKEN_SECRET = yield secret_manager_client_1.secretManagerClient.getSecretValue("PARTNER_ACCESS_TOKEN_SECRET");
|
|
@@ -219,13 +219,15 @@ const authorize = (req, res, next, mongoose, authorizationTypes) => __awaiter(vo
|
|
|
219
219
|
// if no auth
|
|
220
220
|
(!req.currentAdminAuth &&
|
|
221
221
|
!req.currentAuth &&
|
|
222
|
+
!req.currentPartnerAuth &&
|
|
222
223
|
!req.user &&
|
|
223
224
|
!req.partner &&
|
|
224
225
|
!req.validAdminApiKey) ||
|
|
225
226
|
(!req.currentAuth &&
|
|
226
227
|
!authorizationTypes.includes(common_1.AuthorizationType.Auth) &&
|
|
227
228
|
!req.user &&
|
|
228
|
-
!req.validAdminApiKey
|
|
229
|
+
!req.validAdminApiKey &&
|
|
230
|
+
!req.currentPartnerAuth)) {
|
|
229
231
|
if (!req.user &&
|
|
230
232
|
authorizationTypes.includes(common_1.AuthorizationType.UserOptional)) {
|
|
231
233
|
next();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riocrypto/common-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.571",
|
|
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.
|
|
26
|
+
"@riocrypto/common": "^1.0.556",
|
|
27
27
|
"@types/express": "^4.17.13",
|
|
28
28
|
"axios": "^0.27.2",
|
|
29
29
|
"ccxt": "^3.0.30",
|