jose-node-esm-runtime
Advanced tools
Comparing version 4.7.0 to 4.8.0
@@ -13,3 +13,3 @@ import fetchJwks from '../runtime/fetch_jwks.js'; | ||
this._url = new URL(url.href); | ||
this._options = { agent: options === null || options === void 0 ? void 0 : options.agent }; | ||
this._options = { agent: options === null || options === void 0 ? void 0 : options.agent, headers: options === null || options === void 0 ? void 0 : options.headers }; | ||
this._timeoutDuration = | ||
@@ -16,0 +16,0 @@ typeof (options === null || options === void 0 ? void 0 : options.timeoutDuration) === 'number' ? options === null || options === void 0 ? void 0 : options.timeoutDuration : 5000; |
@@ -18,6 +18,7 @@ import * as http from 'http'; | ||
} | ||
const { agent } = options; | ||
const { agent, headers } = options; | ||
const req = get(url.href, { | ||
agent, | ||
timeout, | ||
headers, | ||
}); | ||
@@ -24,0 +25,0 @@ const [response] = (await Promise.race([once(req, 'response'), once(req, 'timeout')])); |
@@ -6,4 +6,4 @@ import * as crypto from 'crypto'; | ||
export const isCryptoKey = util.types.isCryptoKey | ||
? (obj) => util.types.isCryptoKey(obj) | ||
? (key) => util.types.isCryptoKey(key) | ||
: | ||
(obj) => false; | ||
(key) => false; |
@@ -35,2 +35,6 @@ import type { JWSHeaderParameters, FlattenedJWSInput, GetKeyFunction } from '../types'; | ||
agent?: any; | ||
/** | ||
* Optional headers to be sent with the HTTP request. | ||
*/ | ||
headers?: Record<string, string>; | ||
} | ||
@@ -37,0 +41,0 @@ interface URL { |
{ | ||
"name": "jose-node-esm-runtime", | ||
"version": "4.7.0", | ||
"version": "4.8.0", | ||
"homepage": "https://github.com/panva/jose", | ||
@@ -14,2 +14,3 @@ "repository": "panva/jose", | ||
".": { | ||
"worker": "./dist/browser/index.js", | ||
"import": "./dist/node/esm/index.js" | ||
@@ -16,0 +17,0 @@ }, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
231672
6148