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 3.17.0 to 3.18.0

dist/browser/key/export.js

19

dist/browser/runtime/base64url.js
import { encoder, decoder } from '../lib/buffer_utils.js';
import globalThis from './global.js';
export const encode = (input) => {
export const encodeBase64 = (input) => {
let unencoded = input;

@@ -13,5 +13,13 @@ if (typeof unencoded === 'string') {

}
const base64string = globalThis.btoa(arr.join(''));
return base64string.replace(/=/g, '').replace(/\+/g, '-').replace(/\//g, '_');
return globalThis.btoa(arr.join(''));
};
export const encode = (input) => {
return encodeBase64(input).replace(/=/g, '').replace(/\+/g, '-').replace(/\//g, '_');
};
export const decodeBase64 = (encoded) => {
return new Uint8Array(globalThis
.atob(encoded)
.split('')
.map((c) => c.charCodeAt(0)));
};
export const decode = (input) => {

@@ -24,6 +32,3 @@ let encoded = input;

try {
return new Uint8Array(globalThis
.atob(encoded)
.split('')
.map((c) => c.charCodeAt(0)));
return decodeBase64(encoded);
}

@@ -30,0 +35,0 @@ catch (_a) {

import { JOSEError } from '../util/errors.js';
import globalThis from './global.js';
import globalThis, { isCloudflareWorkers } from './global.js';
const fetchJwks = async (url, timeout) => {

@@ -13,3 +13,3 @@ let controller;

method: 'GET',
...(globalThis.WebSocketPair === undefined
...(!isCloudflareWorkers()
? {

@@ -16,0 +16,0 @@ referrerPolicy: 'no-referrer',

{
"name": "jose-browser-runtime",
"version": "3.17.0",
"version": "3.18.0",
"description": "(Browser Runtime) 'JSON Web Almost Everything' - JWA, JWS, JWE, JWT, JWK with no dependencies",
"keywords": [
"browser",
"cloudflare",
"compact",

@@ -11,4 +12,2 @@ "decode",

"detached",
"cloudflare",
"workers",
"ec",

@@ -31,8 +30,13 @@ "ecdsa",

"payload",
"pem",
"pkcs8",
"rsa",
"sign",
"signature",
"spki",
"validate",
"verify",
"webcrypto"
"webcrypto",
"workers",
"x509"
],

@@ -69,2 +73,4 @@ "homepage": "https://github.com/panva/jose",

"./jwt/verify": "./dist/browser/jwt/verify.js",
"./key/export": "./dist/browser/key/export.js",
"./key/import": "./dist/browser/key/import.js",
"./util/base64url": "./dist/browser/util/base64url.js",

@@ -71,0 +77,0 @@ "./util/decode_protected_header": "./dist/browser/util/decode_protected_header.js",

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