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

jose

Package Overview
Dependencies
Maintainers
1
Versions
213
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jose - npm Package Compare versions

Comparing version 5.2.4 to 5.3.0

10

dist/browser/jwe/flattened/encrypt.js

@@ -102,9 +102,7 @@ import { encode as base64url } from '../../runtime/base64url.js';

}
else if (!this._protectedHeader) {
this.setProtectedHeader(parameters);
}
else {
if (!this._protectedHeader) {
this.setProtectedHeader(parameters);
}
else {
this._protectedHeader = { ...this._protectedHeader, ...parameters };
}
this._protectedHeader = { ...this._protectedHeader, ...parameters };
}

@@ -111,0 +109,0 @@ }

11

dist/browser/jwks/local.js

@@ -111,3 +111,12 @@ import { importJWK } from '../key/import.js';

const set = new LocalJWKSet(jwks);
return async (protectedHeader, token) => set.getKey(protectedHeader, token);
const localJWKSet = async (protectedHeader, token) => set.getKey(protectedHeader, token);
Object.defineProperties(localJWKSet, {
jwks: {
value: () => clone(set._jwks),
enumerable: true,
configurable: false,
writable: false,
},
});
return localJWKSet;
}

@@ -12,3 +12,3 @@ import fetchJwks from '../runtime/fetch_jwks.js';

const NAME = 'jose';
const VERSION = 'v5.2.4';
const VERSION = 'v5.3.0';
USER_AGENT = `${NAME}/${VERSION}`;

@@ -80,3 +80,33 @@ }

const set = new RemoteJWKSet(url, options);
return async (protectedHeader, token) => set.getKey(protectedHeader, token);
const remoteJWKSet = async (protectedHeader, token) => set.getKey(protectedHeader, token);
Object.defineProperties(remoteJWKSet, {
coolingDown: {
get: () => set.coolingDown(),
enumerable: true,
configurable: false,
},
fresh: {
get: () => set.fresh(),
enumerable: true,
configurable: false,
},
reload: {
value: () => set.reload(),
enumerable: true,
configurable: false,
writable: false,
},
reloading: {
get: () => !!set._pendingFetch,
enumerable: true,
configurable: false,
},
jwks: {
value: () => set._local?.jwks(),
enumerable: true,
configurable: false,
writable: false,
},
});
return remoteJWKSet;
}

@@ -113,9 +113,7 @@ "use strict";

}
else if (!this._protectedHeader) {
this.setProtectedHeader(parameters);
}
else {
if (!this._protectedHeader) {
this.setProtectedHeader(parameters);
}
else {
this._protectedHeader = { ...this._protectedHeader, ...parameters };
}
this._protectedHeader = { ...this._protectedHeader, ...parameters };
}

@@ -122,0 +120,0 @@ }

@@ -116,4 +116,13 @@ "use strict";

const set = new LocalJWKSet(jwks);
return async (protectedHeader, token) => set.getKey(protectedHeader, token);
const localJWKSet = async (protectedHeader, token) => set.getKey(protectedHeader, token);
Object.defineProperties(localJWKSet, {
jwks: {
value: () => clone(set._jwks),
enumerable: true,
configurable: false,
writable: false,
},
});
return localJWKSet;
}
exports.createLocalJWKSet = createLocalJWKSet;

@@ -15,3 +15,3 @@ "use strict";

const NAME = 'jose';
const VERSION = 'v5.2.4';
const VERSION = 'v5.3.0';
USER_AGENT = `${NAME}/${VERSION}`;

@@ -91,4 +91,34 @@ }

const set = new RemoteJWKSet(url, options);
return async (protectedHeader, token) => set.getKey(protectedHeader, token);
const remoteJWKSet = async (protectedHeader, token) => set.getKey(protectedHeader, token);
Object.defineProperties(remoteJWKSet, {
coolingDown: {
get: () => set.coolingDown(),
enumerable: true,
configurable: false,
},
fresh: {
get: () => set.fresh(),
enumerable: true,
configurable: false,
},
reload: {
value: () => set.reload(),
enumerable: true,
configurable: false,
writable: false,
},
reloading: {
get: () => !!set._pendingFetch,
enumerable: true,
configurable: false,
},
jwks: {
value: () => set._local?.jwks(),
enumerable: true,
configurable: false,
writable: false,
},
});
return remoteJWKSet;
}
exports.createRemoteJWKSet = createRemoteJWKSet;

@@ -110,9 +110,7 @@ import { encode as base64url } from '../../runtime/base64url.js';

}
else if (!this._protectedHeader) {
this.setProtectedHeader(parameters);
}
else {
if (!this._protectedHeader) {
this.setProtectedHeader(parameters);
}
else {
this._protectedHeader = { ...this._protectedHeader, ...parameters };
}
this._protectedHeader = { ...this._protectedHeader, ...parameters };
}

@@ -119,0 +117,0 @@ }

@@ -112,3 +112,12 @@ import { importJWK } from '../key/import.js';

const set = new LocalJWKSet(jwks);
return async (protectedHeader, token) => set.getKey(protectedHeader, token);
const localJWKSet = async (protectedHeader, token) => set.getKey(protectedHeader, token);
Object.defineProperties(localJWKSet, {
jwks: {
value: () => clone(set._jwks),
enumerable: true,
configurable: false,
writable: false,
},
});
return localJWKSet;
}

@@ -12,3 +12,3 @@ import fetchJwks from '../runtime/fetch_jwks.js';

const NAME = 'jose';
const VERSION = 'v5.2.4';
const VERSION = 'v5.3.0';
USER_AGENT = `${NAME}/${VERSION}`;

@@ -88,3 +88,33 @@ }

const set = new RemoteJWKSet(url, options);
return async (protectedHeader, token) => set.getKey(protectedHeader, token);
const remoteJWKSet = async (protectedHeader, token) => set.getKey(protectedHeader, token);
Object.defineProperties(remoteJWKSet, {
coolingDown: {
get: () => set.coolingDown(),
enumerable: true,
configurable: false,
},
fresh: {
get: () => set.fresh(),
enumerable: true,
configurable: false,
},
reload: {
value: () => set.reload(),
enumerable: true,
configurable: false,
writable: false,
},
reloading: {
get: () => !!set._pendingFetch,
enumerable: true,
configurable: false,
},
jwks: {
value: () => set._local?.jwks(),
enumerable: true,
configurable: false,
writable: false,
},
});
return remoteJWKSet;
}
import type { KeyLike, JWSHeaderParameters, JSONWebKeySet, FlattenedJWSInput } from '../types';
/** @private */
export declare class LocalJWKSet<KeyLikeType extends KeyLike = KeyLike> {
protected _jwks?: JSONWebKeySet;
private _jwks?;
private _cached;

@@ -6,0 +6,0 @@ constructor(jwks: unknown);

@@ -1,2 +0,2 @@

import type { KeyLike, JWSHeaderParameters, FlattenedJWSInput } from '../types';
import type { KeyLike, JWSHeaderParameters, FlattenedJWSInput, JSONWebKeySet } from '../types';
/** Options for the remote JSON Web Key Set. */

@@ -56,2 +56,14 @@ export interface RemoteJWKSetOptions {

*/
export declare function createRemoteJWKSet<KeyLikeType extends KeyLike = KeyLike>(url: URL, options?: RemoteJWKSetOptions): (protectedHeader?: JWSHeaderParameters, token?: FlattenedJWSInput) => Promise<KeyLikeType>;
export declare function createRemoteJWKSet<KeyLikeType extends KeyLike = KeyLike>(url: URL, options?: RemoteJWKSetOptions): {
(protectedHeader?: JWSHeaderParameters, token?: FlattenedJWSInput): Promise<KeyLikeType>;
/** @ignore */
coolingDown: boolean;
/** @ignore */
fresh: boolean;
/** @ignore */
reloading: boolean;
/** @ignore */
reload: () => Promise<void>;
/** @ignore */
jwks: () => JSONWebKeySet | undefined;
};
{
"name": "jose",
"version": "5.2.4",
"version": "5.3.0",
"description": "JWA, JWS, JWE, JWT, JWK, JWKS for Node.js, Browser, Cloudflare Workers, Deno, Bun, and other Web-interoperable runtimes",

@@ -5,0 +5,0 @@ "keywords": [

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