Socket
Socket
Sign inDemoInstall

oauth4webapi

Package Overview
Dependencies
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

oauth4webapi - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

24

build/index.js
let USER_AGENT;
if (typeof navigator === 'undefined' || !navigator.userAgent?.startsWith?.('Mozilla/5.0 ')) {
const NAME = 'oauth4webapi';
const VERSION = 'v2.0.0';
const VERSION = 'v2.0.1';
USER_AGENT = `${NAME}/${VERSION}`;

@@ -435,2 +435,17 @@ }

}
if (parameters.has('claims')) {
const value = parameters.get('claims');
if (value === '[object Object]') {
throw new OPE('"claims" parameter must be passed as a UTF-8 encoded JSON');
}
try {
claims.claims = JSON.parse(value);
}
catch {
throw new OPE('failed to parse the "claims" parameter as JSON');
}
if (!isJsonObject(claims.claims)) {
throw new OPE('"claims" parameter must be a top level object');
}
}
return jwt({

@@ -473,5 +488,10 @@ alg: determineJWSAlgorithm(key),

}
const jwkCache = Symbol();
async function publicJwk(key) {
if (key[jwkCache]) {
return key[jwkCache];
}
const { kty, e, n, x, y, crv } = await crypto.subtle.exportKey('jwk', key);
return { kty, crv, e, n, x, y };
const jwk = (key[jwkCache] = { kty, e, n, x, y, crv });
return jwk;
}

@@ -478,0 +498,0 @@ export async function pushedAuthorizationRequest(as, client, parameters, options) {

2

package.json
{
"name": "oauth4webapi",
"version": "2.0.0",
"version": "2.0.1",
"description": "OAuth 2 / OpenID Connect for Web Platform API JavaScript runtimes",

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

@@ -42,3 +42,3 @@ # OAuth 2 / OpenID Connect for Web Platform API JavaScript runtimes

```js
import * as oauth2 from 'https://deno.land/x/oauth4webapi/mod.ts'
import * as oauth2 from 'https://deno.land/x/oauth4webapi@v2.0.1/mod.ts'
```

@@ -75,3 +75,2 @@

- JSON Web Encryption (JWE)
- JSON Web Signature (JWS) rarely used algorithms and HMAC
- Automatic polyfills of any kind
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