Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jose-browser-runtime

Package Overview
Dependencies
Maintainers
1
Versions
132
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jose-browser-runtime - npm Package Compare versions

Comparing version 4.7.0 to 4.8.0

2

dist/browser/jwks/remote.js

@@ -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;

import { JOSEError, JWKSTimeout } from '../util/errors.js';
const fetchJwks = async (url, timeout) => {
const fetchJwks = async (url, timeout, options) => {
let controller;

@@ -16,2 +16,3 @@ let id;

redirect: 'manual',
headers: options.headers,
}).catch((err) => {

@@ -18,0 +19,0 @@ if (timedOut)

export default crypto;
export function isCryptoKey(key) {
try {
return (key != null &&
typeof key.extractable === 'boolean' &&
typeof key.algorithm.name === 'string' &&
typeof key.type === 'string');
}
catch (_a) {
return false;
}
}
export const isCryptoKey = (key) => key instanceof CryptoKey;

@@ -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-browser-runtime",
"version": "4.7.0",
"version": "4.8.0",
"homepage": "https://github.com/panva/jose",

@@ -14,3 +14,4 @@ "repository": "panva/jose",

".": {
"browser": "./dist/browser/index.js"
"browser": "./dist/browser/index.js",
"worker": "./dist/browser/index.js"
},

@@ -17,0 +18,0 @@ "./package.json": "./package.json"

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc