oauth4webapi 2.11.0 → 2.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/build/index.js +7 -5
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -44,7 +44,7 @@ import * as oauth from 'oauth4webapi'
|
|
|
44
44
|
**`example`** Deno import
|
|
45
45
|
|
|
46
46
|
```js
|
|
47
|
-
import * as oauth from 'https://deno.land/x/oauth4webapi@v2.11.
|
|
47
|
+
import * as oauth from 'https://deno.land/x/oauth4webapi@v2.11.1/mod.ts'
|
|
48
48
|
```
|
|
49
49
|
|
|
50
50
|
- Authorization Code Flow (OAuth 2.0) - [source](examples/oauth.ts)
|
package/build/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
let USER_AGENT;
|
|
2
2
|
if (typeof navigator === 'undefined' || !navigator.userAgent?.startsWith?.('Mozilla/5.0 ')) {
|
|
3
3
|
const NAME = 'oauth4webapi';
|
|
4
|
-
const VERSION = 'v2.11.
|
|
4
|
+
const VERSION = 'v2.11.1';
|
|
5
5
|
USER_AGENT = `${NAME}/${VERSION}`;
|
|
6
6
|
}
|
|
7
7
|
function looseInstanceOf(input, expected) {
|
|
@@ -994,8 +994,9 @@ async function processGenericAccessTokenResponse(as, client, response, ignoreIdT
|
|
|
994
994
|
if (Array.isArray(claims.aud) && claims.aud.length !== 1 && claims.azp !== client.client_id) {
|
|
995
995
|
throw new OPE('unexpected ID Token "azp" (authorized party) claim value');
|
|
996
996
|
}
|
|
997
|
-
if (
|
|
998
|
-
|
|
997
|
+
if (claims.auth_time !== undefined &&
|
|
998
|
+
(!Number.isFinite(claims.auth_time) || Math.sign(claims.auth_time) !== 1)) {
|
|
999
|
+
throw new OPE('ID Token "auth_time" (authentication time) must be a positive number');
|
|
999
1000
|
}
|
|
1000
1001
|
idTokenClaims.set(json, claims);
|
|
1001
1002
|
}
|
|
@@ -1584,8 +1585,9 @@ export async function validateDetachedSignatureResponse(as, client, parameters,
|
|
|
1584
1585
|
(await idTokenHashMatches(expectedState, claims.s_hash, header.alg, key)) !== true)) {
|
|
1585
1586
|
throw new OPE('invalid ID Token "s_hash" (state hash) claim value');
|
|
1586
1587
|
}
|
|
1587
|
-
if (
|
|
1588
|
-
|
|
1588
|
+
if (claims.auth_time !== undefined &&
|
|
1589
|
+
(!Number.isFinite(claims.auth_time) || Math.sign(claims.auth_time) !== 1)) {
|
|
1590
|
+
throw new OPE('ID Token "auth_time" (authentication time) must be a positive number');
|
|
1589
1591
|
}
|
|
1590
1592
|
maxAge ?? (maxAge = client.default_max_age ?? skipAuthTimeCheck);
|
|
1591
1593
|
if ((client.require_auth_time || maxAge !== skipAuthTimeCheck) &&
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oauth4webapi",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.1",
|
|
4
4
|
"description": "OAuth 2 / OpenID Connect for JavaScript Runtimes",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"access token",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"devDependencies": {
|
|
68
68
|
"@koa/cors": "^5.0.0",
|
|
69
69
|
"@types/koa__cors": "^5.0.0",
|
|
70
|
-
"@types/node": "^20.14.
|
|
70
|
+
"@types/node": "^20.14.6",
|
|
71
71
|
"@types/oidc-provider": "^8.4.4",
|
|
72
72
|
"@types/qunit": "^2.19.10",
|
|
73
73
|
"archiver": "^7.0.1",
|
|
@@ -75,12 +75,12 @@
|
|
|
75
75
|
"chrome-launcher": "^1.1.2",
|
|
76
76
|
"edge-runtime": "^2.5.10",
|
|
77
77
|
"esbuild": "^0.21.5",
|
|
78
|
-
"jose": "^5.4.
|
|
78
|
+
"jose": "^5.4.1",
|
|
79
79
|
"oidc-provider": "^8.4.6",
|
|
80
80
|
"patch-package": "^8.0.0",
|
|
81
81
|
"prettier": "^3.3.2",
|
|
82
82
|
"prettier-plugin-jsdoc": "^1.3.0",
|
|
83
|
-
"puppeteer-core": "^22.11.
|
|
83
|
+
"puppeteer-core": "^22.11.2",
|
|
84
84
|
"qunit": "^2.21.0",
|
|
85
85
|
"raw-body": "^2.5.2",
|
|
86
86
|
"selfsigned": "^2.4.1",
|