@thirdweb-dev/service-utils 0.2.0-nightly-fd0650dc-20230714210005 → 0.2.0-nightly-42d9ab68-20230714223422
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/cf-worker/dist/thirdweb-dev-service-utils-cf-worker.cjs.dev.js +3 -2
- package/cf-worker/dist/thirdweb-dev-service-utils-cf-worker.cjs.prod.js +3 -2
- package/cf-worker/dist/thirdweb-dev-service-utils-cf-worker.esm.js +3 -2
- package/dist/declarations/src/cf-worker/index.d.ts.map +1 -1
- package/dist/declarations/src/core/authorize/index.d.ts +1 -0
- package/dist/declarations/src/core/authorize/index.d.ts.map +1 -1
- package/dist/declarations/src/core/authorize/types.d.ts +1 -1
- package/dist/declarations/src/core/authorize/types.d.ts.map +1 -1
- package/dist/declarations/src/core/types.d.ts +1 -0
- package/dist/declarations/src/core/types.d.ts.map +1 -1
- package/dist/declarations/src/node/index.d.ts.map +1 -1
- package/dist/{index-b1597fc7.cjs.prod.js → index-03e2bf97.cjs.dev.js} +21 -5
- package/dist/{index-e63ba474.cjs.dev.js → index-2facafef.cjs.prod.js} +21 -5
- package/dist/{index-bcedf9fe.esm.js → index-e7c3b3be.esm.js} +21 -5
- package/node/dist/thirdweb-dev-service-utils-node.cjs.dev.js +3 -2
- package/node/dist/thirdweb-dev-service-utils-node.cjs.prod.js +3 -2
- package/node/dist/thirdweb-dev-service-utils-node.esm.js +3 -2
- package/package.json +1 -1
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
var index = require('../../dist/index-
|
5
|
+
var index = require('../../dist/index-03e2bf97.cjs.dev.js');
|
6
6
|
var services = require('../../dist/services-a3f36057.cjs.dev.js');
|
7
7
|
|
8
8
|
const DEFAULT_CACHE_TTL_SECONDS = 60;
|
@@ -94,7 +94,8 @@ async function extractAuthorizationData(authInput) {
|
|
94
94
|
origin,
|
95
95
|
bundleId,
|
96
96
|
secretKeyHash,
|
97
|
-
targetAddress: authInput.targetAddress
|
97
|
+
targetAddress: authInput.targetAddress,
|
98
|
+
enforceAuth: authInput.enforcedAuth
|
98
99
|
};
|
99
100
|
}
|
100
101
|
async function hashSecretKey(secretKey) {
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
var index = require('../../dist/index-
|
5
|
+
var index = require('../../dist/index-2facafef.cjs.prod.js');
|
6
6
|
var services = require('../../dist/services-9e185105.cjs.prod.js');
|
7
7
|
|
8
8
|
const DEFAULT_CACHE_TTL_SECONDS = 60;
|
@@ -94,7 +94,8 @@ async function extractAuthorizationData(authInput) {
|
|
94
94
|
origin,
|
95
95
|
bundleId,
|
96
96
|
secretKeyHash,
|
97
|
-
targetAddress: authInput.targetAddress
|
97
|
+
targetAddress: authInput.targetAddress,
|
98
|
+
enforceAuth: authInput.enforcedAuth
|
98
99
|
};
|
99
100
|
}
|
100
101
|
async function hashSecretKey(secretKey) {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { a as authorize } from '../../dist/index-
|
1
|
+
import { a as authorize } from '../../dist/index-e7c3b3be.esm.js';
|
2
2
|
export { b as SERVICES, S as SERVICE_DEFINITIONS, a as SERVICE_NAMES, g as getServiceByName } from '../../dist/services-86283509.esm.js';
|
3
3
|
|
4
4
|
const DEFAULT_CACHE_TTL_SECONDS = 60;
|
@@ -90,7 +90,8 @@ async function extractAuthorizationData(authInput) {
|
|
90
90
|
origin,
|
91
91
|
bundleId,
|
92
92
|
secretKeyHash,
|
93
|
-
targetAddress: authInput.targetAddress
|
93
|
+
targetAddress: authInput.targetAddress,
|
94
|
+
enforceAuth: authInput.enforcedAuth
|
94
95
|
};
|
95
96
|
}
|
96
97
|
async function hashSecretKey(secretKey) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"../../../../src/cf-worker","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAC/E,OAAO,KAAK,EAAkB,iBAAiB,EAAE,uBAAoB;AAGrE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AAEzD,OAAO,KAAK,EAAE,mBAAmB,EAAE,mCAAgC;AACnE,OAAO,KAAK,EAAE,aAAa,EAAE,yBAAsB;AAEnD,oCAAiC;AAEjC,KAAK,mBAAmB,GAAG,iBAAiB,GAAG;IAC7C,OAAO,EAAE,WAAW,CAAC;IACrB,GAAG,EAAE,gBAAgB,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAIF,KAAK,SAAS,GAAG,aAAa,GAAG;IAC/B,GAAG,EAAE,OAAO,CAAC;CACd,CAAC;AAEF,wBAAsB,eAAe,CACnC,SAAS,EAAE,SAAS,EACpB,aAAa,EAAE,mBAAmB,GACjC,OAAO,CAAC,mBAAmB,CAAC,CA0C9B;
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"../../../../src/cf-worker","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAC/E,OAAO,KAAK,EAAkB,iBAAiB,EAAE,uBAAoB;AAGrE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AAEzD,OAAO,KAAK,EAAE,mBAAmB,EAAE,mCAAgC;AACnE,OAAO,KAAK,EAAE,aAAa,EAAE,yBAAsB;AAEnD,oCAAiC;AAEjC,KAAK,mBAAmB,GAAG,iBAAiB,GAAG;IAC7C,OAAO,EAAE,WAAW,CAAC;IACrB,GAAG,EAAE,gBAAgB,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAIF,KAAK,SAAS,GAAG,aAAa,GAAG;IAC/B,GAAG,EAAE,OAAO,CAAC;CACd,CAAC;AAEF,wBAAsB,eAAe,CACnC,SAAS,EAAE,SAAS,EACpB,aAAa,EAAE,mBAAmB,GACjC,OAAO,CAAC,mBAAmB,CAAC,CA0C9B;AAqED,wBAAsB,aAAa,CAAC,SAAS,EAAE,MAAM,mBAIpD;AAED,wBAAgB,+BAA+B,CAAC,aAAa,EAAE,MAAM,UAEpE"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"../../../../../src/core/authorize","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,iBAAiB,EAElB,kBAAe;AAGhB,OAAO,EAAE,mBAAmB,EAAE,mBAAgB;AAE9C,MAAM,MAAM,kBAAkB,GAAG;IAC/B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"../../../../../src/core/authorize","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,iBAAiB,EAElB,kBAAe;AAGhB,OAAO,EAAE,mBAAmB,EAAE,mBAAgB;AAE9C,MAAM,MAAM,kBAAkB,GAAG;IAC/B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAClC,WAAW,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,KAAK,YAAY,GAAG;IAClB,GAAG,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAClD,GAAG,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IACtE,eAAe,EAAE,MAAM,CAAC;CACzB,CAAC;AASF,wBAAsB,SAAS,CAC7B,QAAQ,EAAE,kBAAkB,EAC5B,aAAa,EAAE,iBAAiB,EAChC,YAAY,CAAC,EAAE,YAAY,GAC1B,OAAO,CAAC,mBAAmB,CAAC,CA+H9B"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"../../../../../src/core/authorize","sources":["types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,kBAAe;AAExC,MAAM,MAAM,mBAAmB,GAC3B;IACE,UAAU,EAAE,IAAI,CAAC;IACjB,UAAU,EAAE,cAAc,CAAC;
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"../../../../../src/core/authorize","sources":["types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,kBAAe;AAExC,MAAM,MAAM,mBAAmB,GAC3B;IACE,UAAU,EAAE,IAAI,CAAC;IACjB,UAAU,EAAE,cAAc,GAAG,IAAI,CAAC;CACnC,GACD;IACE,UAAU,EAAE,KAAK,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"../../../../src/core","sources":["types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GAAG;IAE1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"../../../../src/core","sources":["types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GAAG;IAE1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAElC,YAAY,EAAE,OAAO,CAAC;CACvB,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"../../../../src/node","sources":["index.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAuB,eAAe,EAAE,MAAM,WAAW,CAAC;AAEtE,OAAO,KAAK,EAAE,kBAAkB,EAAE,mCAA0B;AAC5D,OAAO,KAAK,EAAE,iBAAiB,EAAE,uBAAoB;AAErD,OAAO,KAAK,EAAE,mBAAmB,EAAE,mCAAgC;AACnE,OAAO,KAAK,EAAE,aAAa,EAAE,yBAAsB;AAEnD,oCAAiC;AAEjC,KAAK,iBAAiB,GAAG,iBAAiB,CAAC;AAE3C,MAAM,MAAM,SAAS,GAAG,aAAa,GAAG;IACtC,GAAG,EAAE,eAAe,CAAC;CACtB,CAAC;AAEF,wBAAsB,aAAa,CACjC,SAAS,EAAE,SAAS,EACpB,aAAa,EAAE,iBAAiB,GAC/B,OAAO,CAAC,mBAAmB,CAAC,CAsB9B;AAaD,wBAAgB,wBAAwB,CACtC,SAAS,EAAE,SAAS,GACnB,kBAAkB,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"../../../../src/node","sources":["index.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAuB,eAAe,EAAE,MAAM,WAAW,CAAC;AAEtE,OAAO,KAAK,EAAE,kBAAkB,EAAE,mCAA0B;AAC5D,OAAO,KAAK,EAAE,iBAAiB,EAAE,uBAAoB;AAErD,OAAO,KAAK,EAAE,mBAAmB,EAAE,mCAAgC;AACnE,OAAO,KAAK,EAAE,aAAa,EAAE,yBAAsB;AAEnD,oCAAiC;AAEjC,KAAK,iBAAiB,GAAG,iBAAiB,CAAC;AAE3C,MAAM,MAAM,SAAS,GAAG,aAAa,GAAG;IACtC,GAAG,EAAE,eAAe,CAAC;CACtB,CAAC;AAEF,wBAAsB,aAAa,CACjC,SAAS,EAAE,SAAS,EACpB,aAAa,EAAE,iBAAiB,GAC/B,OAAO,CAAC,mBAAmB,CAAC,CAsB9B;AAaD,wBAAgB,wBAAwB,CACtC,SAAS,EAAE,SAAS,GACnB,kBAAkB,CAyEpB;AAED,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,UAE9C;AAED,wBAAgB,+BAA+B,CAAC,aAAa,EAAE,MAAM,UAEpE"}
|
@@ -157,8 +157,24 @@ function authorizeService(apiKeyMetadata, serviceConfig, authorizationPayload) {
|
|
157
157
|
}
|
158
158
|
|
159
159
|
async function authorize(authData, serviceConfig, cacheOptions) {
|
160
|
+
const {
|
161
|
+
clientId,
|
162
|
+
targetAddress,
|
163
|
+
enforceAuth,
|
164
|
+
secretKeyHash
|
165
|
+
} = authData;
|
166
|
+
|
167
|
+
// BACKWARDS COMPAT: if auth not enforced and
|
168
|
+
// we don't have auth credentials bypass
|
169
|
+
if (!enforceAuth && !clientId && !secretKeyHash) {
|
170
|
+
return {
|
171
|
+
authorized: true,
|
172
|
+
apiKeyMeta: null
|
173
|
+
};
|
174
|
+
}
|
175
|
+
|
160
176
|
// if we don't have a client id at this point we can't authorize
|
161
|
-
if (!
|
177
|
+
if (!clientId) {
|
162
178
|
return {
|
163
179
|
authorized: false,
|
164
180
|
status: 401,
|
@@ -170,7 +186,7 @@ async function authorize(authData, serviceConfig, cacheOptions) {
|
|
170
186
|
// if we have cache options we want to check the cache first
|
171
187
|
if (cacheOptions) {
|
172
188
|
try {
|
173
|
-
const cachedKey = await cacheOptions.get(
|
189
|
+
const cachedKey = await cacheOptions.get(clientId);
|
174
190
|
if (cachedKey) {
|
175
191
|
const parsed = JSON.parse(cachedKey);
|
176
192
|
if ("updatedAt" in parsed) {
|
@@ -198,7 +214,7 @@ async function authorize(authData, serviceConfig, cacheOptions) {
|
|
198
214
|
const {
|
199
215
|
data,
|
200
216
|
error
|
201
|
-
} = await fetchKeyMetadataFromApi(
|
217
|
+
} = await fetchKeyMetadataFromApi(clientId, serviceConfig);
|
202
218
|
if (error) {
|
203
219
|
return {
|
204
220
|
authorized: false,
|
@@ -220,7 +236,7 @@ async function authorize(authData, serviceConfig, cacheOptions) {
|
|
220
236
|
// cache the retrieved key if we have cache options
|
221
237
|
if (cacheOptions) {
|
222
238
|
// we await this always because it can be a promise or not
|
223
|
-
await cacheOptions.put(
|
239
|
+
await cacheOptions.put(clientId, data);
|
224
240
|
}
|
225
241
|
} catch (err) {
|
226
242
|
console.warn("failed to fetch key metadata from api", err);
|
@@ -253,7 +269,7 @@ async function authorize(authData, serviceConfig, cacheOptions) {
|
|
253
269
|
|
254
270
|
// if we've made it this far we need to check service specific authorization
|
255
271
|
const serviceAuth = authorizeService(apiKeyMeta, serviceConfig, {
|
256
|
-
targetAddress
|
272
|
+
targetAddress
|
257
273
|
});
|
258
274
|
if (!serviceAuth.authorized) {
|
259
275
|
return {
|
@@ -157,8 +157,24 @@ function authorizeService(apiKeyMetadata, serviceConfig, authorizationPayload) {
|
|
157
157
|
}
|
158
158
|
|
159
159
|
async function authorize(authData, serviceConfig, cacheOptions) {
|
160
|
+
const {
|
161
|
+
clientId,
|
162
|
+
targetAddress,
|
163
|
+
enforceAuth,
|
164
|
+
secretKeyHash
|
165
|
+
} = authData;
|
166
|
+
|
167
|
+
// BACKWARDS COMPAT: if auth not enforced and
|
168
|
+
// we don't have auth credentials bypass
|
169
|
+
if (!enforceAuth && !clientId && !secretKeyHash) {
|
170
|
+
return {
|
171
|
+
authorized: true,
|
172
|
+
apiKeyMeta: null
|
173
|
+
};
|
174
|
+
}
|
175
|
+
|
160
176
|
// if we don't have a client id at this point we can't authorize
|
161
|
-
if (!
|
177
|
+
if (!clientId) {
|
162
178
|
return {
|
163
179
|
authorized: false,
|
164
180
|
status: 401,
|
@@ -170,7 +186,7 @@ async function authorize(authData, serviceConfig, cacheOptions) {
|
|
170
186
|
// if we have cache options we want to check the cache first
|
171
187
|
if (cacheOptions) {
|
172
188
|
try {
|
173
|
-
const cachedKey = await cacheOptions.get(
|
189
|
+
const cachedKey = await cacheOptions.get(clientId);
|
174
190
|
if (cachedKey) {
|
175
191
|
const parsed = JSON.parse(cachedKey);
|
176
192
|
if ("updatedAt" in parsed) {
|
@@ -198,7 +214,7 @@ async function authorize(authData, serviceConfig, cacheOptions) {
|
|
198
214
|
const {
|
199
215
|
data,
|
200
216
|
error
|
201
|
-
} = await fetchKeyMetadataFromApi(
|
217
|
+
} = await fetchKeyMetadataFromApi(clientId, serviceConfig);
|
202
218
|
if (error) {
|
203
219
|
return {
|
204
220
|
authorized: false,
|
@@ -220,7 +236,7 @@ async function authorize(authData, serviceConfig, cacheOptions) {
|
|
220
236
|
// cache the retrieved key if we have cache options
|
221
237
|
if (cacheOptions) {
|
222
238
|
// we await this always because it can be a promise or not
|
223
|
-
await cacheOptions.put(
|
239
|
+
await cacheOptions.put(clientId, data);
|
224
240
|
}
|
225
241
|
} catch (err) {
|
226
242
|
console.warn("failed to fetch key metadata from api", err);
|
@@ -253,7 +269,7 @@ async function authorize(authData, serviceConfig, cacheOptions) {
|
|
253
269
|
|
254
270
|
// if we've made it this far we need to check service specific authorization
|
255
271
|
const serviceAuth = authorizeService(apiKeyMeta, serviceConfig, {
|
256
|
-
targetAddress
|
272
|
+
targetAddress
|
257
273
|
});
|
258
274
|
if (!serviceAuth.authorized) {
|
259
275
|
return {
|
@@ -155,8 +155,24 @@ function authorizeService(apiKeyMetadata, serviceConfig, authorizationPayload) {
|
|
155
155
|
}
|
156
156
|
|
157
157
|
async function authorize(authData, serviceConfig, cacheOptions) {
|
158
|
+
const {
|
159
|
+
clientId,
|
160
|
+
targetAddress,
|
161
|
+
enforceAuth,
|
162
|
+
secretKeyHash
|
163
|
+
} = authData;
|
164
|
+
|
165
|
+
// BACKWARDS COMPAT: if auth not enforced and
|
166
|
+
// we don't have auth credentials bypass
|
167
|
+
if (!enforceAuth && !clientId && !secretKeyHash) {
|
168
|
+
return {
|
169
|
+
authorized: true,
|
170
|
+
apiKeyMeta: null
|
171
|
+
};
|
172
|
+
}
|
173
|
+
|
158
174
|
// if we don't have a client id at this point we can't authorize
|
159
|
-
if (!
|
175
|
+
if (!clientId) {
|
160
176
|
return {
|
161
177
|
authorized: false,
|
162
178
|
status: 401,
|
@@ -168,7 +184,7 @@ async function authorize(authData, serviceConfig, cacheOptions) {
|
|
168
184
|
// if we have cache options we want to check the cache first
|
169
185
|
if (cacheOptions) {
|
170
186
|
try {
|
171
|
-
const cachedKey = await cacheOptions.get(
|
187
|
+
const cachedKey = await cacheOptions.get(clientId);
|
172
188
|
if (cachedKey) {
|
173
189
|
const parsed = JSON.parse(cachedKey);
|
174
190
|
if ("updatedAt" in parsed) {
|
@@ -196,7 +212,7 @@ async function authorize(authData, serviceConfig, cacheOptions) {
|
|
196
212
|
const {
|
197
213
|
data,
|
198
214
|
error
|
199
|
-
} = await fetchKeyMetadataFromApi(
|
215
|
+
} = await fetchKeyMetadataFromApi(clientId, serviceConfig);
|
200
216
|
if (error) {
|
201
217
|
return {
|
202
218
|
authorized: false,
|
@@ -218,7 +234,7 @@ async function authorize(authData, serviceConfig, cacheOptions) {
|
|
218
234
|
// cache the retrieved key if we have cache options
|
219
235
|
if (cacheOptions) {
|
220
236
|
// we await this always because it can be a promise or not
|
221
|
-
await cacheOptions.put(
|
237
|
+
await cacheOptions.put(clientId, data);
|
222
238
|
}
|
223
239
|
} catch (err) {
|
224
240
|
console.warn("failed to fetch key metadata from api", err);
|
@@ -251,7 +267,7 @@ async function authorize(authData, serviceConfig, cacheOptions) {
|
|
251
267
|
|
252
268
|
// if we've made it this far we need to check service specific authorization
|
253
269
|
const serviceAuth = authorizeService(apiKeyMeta, serviceConfig, {
|
254
|
-
targetAddress
|
270
|
+
targetAddress
|
255
271
|
});
|
256
272
|
if (!serviceAuth.authorized) {
|
257
273
|
return {
|
@@ -3,7 +3,7 @@
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
5
|
var node_crypto = require('node:crypto');
|
6
|
-
var index = require('../../dist/index-
|
6
|
+
var index = require('../../dist/index-03e2bf97.cjs.dev.js');
|
7
7
|
var services = require('../../dist/services-a3f36057.cjs.dev.js');
|
8
8
|
|
9
9
|
async function authorizeNode(authInput, serviceConfig) {
|
@@ -97,7 +97,8 @@ function extractAuthorizationData(authInput) {
|
|
97
97
|
clientId,
|
98
98
|
origin,
|
99
99
|
bundleId,
|
100
|
-
targetAddress: authInput.targetAddress
|
100
|
+
targetAddress: authInput.targetAddress,
|
101
|
+
enforceAuth: authInput.enforcedAuth
|
101
102
|
};
|
102
103
|
}
|
103
104
|
function hashSecretKey(secretKey) {
|
@@ -3,7 +3,7 @@
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
5
|
var node_crypto = require('node:crypto');
|
6
|
-
var index = require('../../dist/index-
|
6
|
+
var index = require('../../dist/index-2facafef.cjs.prod.js');
|
7
7
|
var services = require('../../dist/services-9e185105.cjs.prod.js');
|
8
8
|
|
9
9
|
async function authorizeNode(authInput, serviceConfig) {
|
@@ -97,7 +97,8 @@ function extractAuthorizationData(authInput) {
|
|
97
97
|
clientId,
|
98
98
|
origin,
|
99
99
|
bundleId,
|
100
|
-
targetAddress: authInput.targetAddress
|
100
|
+
targetAddress: authInput.targetAddress,
|
101
|
+
enforceAuth: authInput.enforcedAuth
|
101
102
|
};
|
102
103
|
}
|
103
104
|
function hashSecretKey(secretKey) {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { createHash } from 'node:crypto';
|
2
|
-
import { a as authorize } from '../../dist/index-
|
2
|
+
import { a as authorize } from '../../dist/index-e7c3b3be.esm.js';
|
3
3
|
export { b as SERVICES, S as SERVICE_DEFINITIONS, a as SERVICE_NAMES, g as getServiceByName } from '../../dist/services-86283509.esm.js';
|
4
4
|
|
5
5
|
async function authorizeNode(authInput, serviceConfig) {
|
@@ -93,7 +93,8 @@ function extractAuthorizationData(authInput) {
|
|
93
93
|
clientId,
|
94
94
|
origin,
|
95
95
|
bundleId,
|
96
|
-
targetAddress: authInput.targetAddress
|
96
|
+
targetAddress: authInput.targetAddress,
|
97
|
+
enforceAuth: authInput.enforcedAuth
|
97
98
|
};
|
98
99
|
}
|
99
100
|
function hashSecretKey(secretKey) {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@thirdweb-dev/service-utils",
|
3
|
-
"version": "0.2.0-nightly-
|
3
|
+
"version": "0.2.0-nightly-42d9ab68-20230714223422",
|
4
4
|
"main": "dist/thirdweb-dev-service-utils.cjs.js",
|
5
5
|
"module": "dist/thirdweb-dev-service-utils.esm.js",
|
6
6
|
"exports": {
|