openid-client 4.7.2 → 4.8.0

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 CHANGED
@@ -42,12 +42,13 @@ openid-client.
42
42
  - Client Authentication
43
43
  - tls_client_auth
44
44
  - self_signed_tls_client_auth
45
+ - [RFC9101 - OAuth 2.0 JWT-Secured Authorization Request (JAR)][feature-jar]
46
+ - [RFC9126 - OAuth 2.0 Pushed Authorization Requests (PAR)][feature-par]
45
47
  - [OpenID Connect Session Management 1.0 - draft 28][feature-rp-logout]
46
48
  - RP-Initiated Logout
47
49
  - [Financial-grade API - Part 2: Read and Write API Security Profile (FAPI) - ID2][feature-fapi]
48
50
  - [JWT Secured Authorization Response Mode for OAuth 2.0 (JARM) - ID1][feature-jarm]
49
51
  - [OAuth 2.0 Demonstration of Proof-of-Possession at the Application Layer (DPoP) - draft 01][feature-dpop]
50
- - [OAuth 2.0 Pushed Authorization Requests (PAR) - draft 06][feature-par]
51
52
 
52
53
  Updates to draft specifications (DPoP, JARM, and FAPI) are released as MINOR library versions,
53
54
  if you utilize these specification implementations consider using the tilde `~` operator in your
@@ -297,7 +298,8 @@ See [Customizing (docs)](https://github.com/panva/node-openid-client/blob/master
297
298
  [feature-jarm]: https://openid.net/specs/openid-financial-api-jarm-ID1.html
298
299
  [feature-fapi]: https://openid.net/specs/openid-financial-api-part-2-ID2.html
299
300
  [feature-dpop]: https://tools.ietf.org/html/draft-ietf-oauth-dpop-01
300
- [feature-par]: https://tools.ietf.org/html/draft-ietf-oauth-par-06
301
+ [feature-par]: https://www.rfc-editor.org/rfc/rfc9126.html
302
+ [feature-jar]: https://www.rfc-editor.org/rfc/rfc9101.html
301
303
  [openid-certified-link]: https://openid.net/certification/
302
304
  [passport-url]: http://passportjs.org
303
305
  [npm-url]: https://www.npmjs.com/package/openid-client
package/lib/client.js CHANGED
@@ -724,6 +724,8 @@ module.exports = (issuer, aadIssValidation = false) => class Client extends Base
724
724
  });
725
725
  }
726
726
 
727
+ const fapi = this.constructor.name === 'FAPIClient';
728
+
727
729
  if (returnedBy === 'authorization') {
728
730
  if (!payload.at_hash && tokenSet.access_token) {
729
731
  throw new RPError({
@@ -739,19 +741,7 @@ module.exports = (issuer, aadIssValidation = false) => class Client extends Base
739
741
  });
740
742
  }
741
743
 
742
- const fapi = this.constructor.name === 'FAPIClient';
743
-
744
744
  if (fapi) {
745
- if (payload.iat < timestamp - 3600) {
746
- throw new RPError({
747
- printf: ['JWT issued too far in the past, now %i, iat %i', timestamp, payload.iat],
748
- now: timestamp,
749
- tolerance: this[CLOCK_TOLERANCE],
750
- iat: payload.iat,
751
- jwt: idToken,
752
- });
753
- }
754
-
755
745
  if (!payload.s_hash && (tokenSet.state || state)) {
756
746
  throw new RPError({
757
747
  message: 'missing required property s_hash',
@@ -773,6 +763,16 @@ module.exports = (issuer, aadIssValidation = false) => class Client extends Base
773
763
  }
774
764
  }
775
765
 
766
+ if (fapi && payload.iat < timestamp - 3600) {
767
+ throw new RPError({
768
+ printf: ['JWT issued too far in the past, now %i, iat %i', timestamp, payload.iat],
769
+ now: timestamp,
770
+ tolerance: this[CLOCK_TOLERANCE],
771
+ iat: payload.iat,
772
+ jwt: idToken,
773
+ });
774
+ }
775
+
776
776
  if (tokenSet.access_token && payload.at_hash !== undefined) {
777
777
  try {
778
778
  tokenHash.validate({ claim: 'at_hash', source: 'access_token' }, payload.at_hash, tokenSet.access_token, header.alg, key && key.crv);
@@ -1550,6 +1550,57 @@ module.exports = (issuer, aadIssValidation = false) => class Client extends Base
1550
1550
  });
1551
1551
  }
1552
1552
 
1553
+ /**
1554
+ * @name pushedAuthorizationRequest
1555
+ * @api public
1556
+ */
1557
+ async pushedAuthorizationRequest(params = {}, { clientAssertionPayload } = {}) {
1558
+ assertIssuerConfiguration(this.issuer, 'pushed_authorization_request_endpoint');
1559
+
1560
+ const body = {
1561
+ ...('request' in params ? params : authorizationParams.call(this, params)),
1562
+ client_id: this.client_id,
1563
+ };
1564
+
1565
+ const response = await authenticatedPost.call(
1566
+ this,
1567
+ 'pushed_authorization_request',
1568
+ {
1569
+ responseType: 'json',
1570
+ form: body,
1571
+ },
1572
+ { clientAssertionPayload, endpointAuthMethod: 'token' },
1573
+ );
1574
+ const responseBody = processResponse(response, { statusCode: 201 });
1575
+
1576
+ if (!('expires_in' in responseBody)) {
1577
+ throw new RPError({
1578
+ message: 'expected expires_in in Pushed Authorization Successful Response',
1579
+ response,
1580
+ });
1581
+ }
1582
+ if (typeof responseBody.expires_in !== 'number') {
1583
+ throw new RPError({
1584
+ message: 'invalid expires_in value in Pushed Authorization Successful Response',
1585
+ response,
1586
+ });
1587
+ }
1588
+ if (!('request_uri' in responseBody)) {
1589
+ throw new RPError({
1590
+ message: 'expected request_uri in Pushed Authorization Successful Response',
1591
+ response,
1592
+ });
1593
+ }
1594
+ if (typeof responseBody.request_uri !== 'string') {
1595
+ throw new RPError({
1596
+ message: 'invalid request_uri value in Pushed Authorization Successful Response',
1597
+ response,
1598
+ });
1599
+ }
1600
+
1601
+ return responseBody;
1602
+ }
1603
+
1553
1604
  /**
1554
1605
  * @name issuer
1555
1606
  * @api public
@@ -1660,72 +1711,4 @@ Object.defineProperty(BaseClient.prototype, 'dpopProof', {
1660
1711
  },
1661
1712
  });
1662
1713
 
1663
- /**
1664
- * @name pushedAuthorizationRequest
1665
- * @api public
1666
- */
1667
- async function pushedAuthorizationRequest(params = {}, { clientAssertionPayload } = {}) {
1668
- assertIssuerConfiguration(this.issuer, 'pushed_authorization_request_endpoint');
1669
-
1670
- const body = {
1671
- ...('request' in params ? params : authorizationParams.call(this, params)),
1672
- client_id: this.client_id,
1673
- };
1674
-
1675
- const response = await authenticatedPost.call(
1676
- this,
1677
- 'pushed_authorization_request',
1678
- {
1679
- responseType: 'json',
1680
- form: body,
1681
- },
1682
- { clientAssertionPayload, endpointAuthMethod: 'token' },
1683
- );
1684
- const responseBody = processResponse(response, { statusCode: 201 });
1685
-
1686
- if (!('expires_in' in responseBody)) {
1687
- throw new RPError({
1688
- message: 'expected expires_in in Pushed Authorization Successful Response',
1689
- response,
1690
- });
1691
- }
1692
- if (typeof responseBody.expires_in !== 'number') {
1693
- throw new RPError({
1694
- message: 'invalid expires_in value in Pushed Authorization Successful Response',
1695
- response,
1696
- });
1697
- }
1698
- if (!('request_uri' in responseBody)) {
1699
- throw new RPError({
1700
- message: 'expected request_uri in Pushed Authorization Successful Response',
1701
- response,
1702
- });
1703
- }
1704
- if (typeof responseBody.request_uri !== 'string') {
1705
- throw new RPError({
1706
- message: 'invalid request_uri value in Pushed Authorization Successful Response',
1707
- response,
1708
- });
1709
- }
1710
-
1711
- return responseBody;
1712
- }
1713
-
1714
- Object.defineProperty(BaseClient.prototype, 'pushedAuthorizationRequest', {
1715
- enumerable: true,
1716
- configurable: true,
1717
- value(...args) {
1718
- process.emitWarning(
1719
- 'The Pushed Authorization Requests APIs implements an IETF draft. Breaking draft implementations are included as minor versions of the openid-client library, therefore, the ~ semver operator should be used and close attention be payed to library changelog as well as the drafts themselves.',
1720
- 'DraftWarning',
1721
- );
1722
- Object.defineProperty(BaseClient.prototype, 'pushedAuthorizationRequest', {
1723
- enumerable: true,
1724
- configurable: true,
1725
- value: pushedAuthorizationRequest,
1726
- });
1727
- return this.pushedAuthorizationRequest(...args);
1728
- },
1729
- });
1730
-
1731
1714
  module.exports.BaseClient = BaseClient;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openid-client",
3
- "version": "4.7.2",
3
+ "version": "4.8.0",
4
4
  "description": "OpenID Connect Relying Party (RP, Client) implementation for Node.js runtime, supports passportjs",
5
5
  "keywords": [
6
6
  "auth",
@@ -43,7 +43,6 @@
43
43
  "coverage": "nyc mocha test/**/*.test.js",
44
44
  "lint": "eslint lib test",
45
45
  "lint-fix": "eslint lib test --fix",
46
- "lint-ts": "npx typescript@~3.6.0 --build types",
47
46
  "test": "mocha test/**/*.test.js"
48
47
  },
49
48
  "nyc": {
package/types/index.d.ts CHANGED
@@ -380,6 +380,8 @@ export interface IntrospectionResponse {
380
380
  username?: string;
381
381
  aud?: string | string[];
382
382
  scope: string;
383
+ sub?: string;
384
+ nbf?: number;
383
385
  token_type?: string;
384
386
  cnf?: {
385
387
  "x5t#S256"?: string;
@@ -513,7 +515,7 @@ export class Client {
513
515
  options?: {
514
516
  headers?: object;
515
517
  body?: string | Buffer;
516
- method?: "GET" | "POST" | "PUT" | "HEAD" | "DELETE" | "OPTIONS" | "TRACE";
518
+ method?: "GET" | "POST" | "PUT" | "HEAD" | "DELETE" | "OPTIONS" | "TRACE" | "PATCH";
517
519
  tokenType?: string;
518
520
  DPoP?: DPoPInput;
519
521
  }
package/CHANGELOG.md DELETED
@@ -1,1094 +0,0 @@
1
- # Changelog
2
-
3
- All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
-
5
- ## [4.7.2](https://github.com/panva/node-openid-client/compare/v4.7.1...v4.7.2) (2021-04-23)
6
-
7
-
8
- ### Bug Fixes
9
-
10
- * **typescript:** add types for 4.6.0 additions ([9064136](https://github.com/panva/node-openid-client/commit/9064136d959b5825f69b32344bbe165f12a10949))
11
-
12
- ## [4.7.1](https://github.com/panva/node-openid-client/compare/v4.7.0...v4.7.1) (2021-04-22)
13
-
14
-
15
- ### Bug Fixes
16
-
17
- * **typescript:** add types for 4.7.0 additions ([2c1d2ab](https://github.com/panva/node-openid-client/commit/2c1d2ab71fe2daba2dad23af1f92f66c92305df5))
18
-
19
- ## [4.7.0](https://github.com/panva/node-openid-client/compare/v4.6.0...v4.7.0) (2021-04-22)
20
-
21
-
22
- ### Features
23
-
24
- * add abort control over Device Flow Handle polling ([#357](https://github.com/panva/node-openid-client/issues/357)) ([f6faa68](https://github.com/panva/node-openid-client/commit/f6faa68850e2582c92e69fa420b8d5c58bfc951c)), closes [#355](https://github.com/panva/node-openid-client/issues/355) [#356](https://github.com/panva/node-openid-client/issues/356)
25
-
26
- ## [4.6.0](https://github.com/panva/node-openid-client/compare/v4.5.2...v4.6.0) (2021-03-25)
27
-
28
-
29
- ### Features
30
-
31
- * added OAuth 2.0 Pushed Authorization Requests client API ([e7af9f5](https://github.com/panva/node-openid-client/commit/e7af9f5125c9c1a8877482b8fda44954e60707a1)), closes [#259](https://github.com/panva/node-openid-client/issues/259)
32
-
33
- ## [4.5.2](https://github.com/panva/node-openid-client/compare/v4.5.1...v4.5.2) (2021-03-24)
34
-
35
-
36
- ### Bug Fixes
37
-
38
- * interoperable audience array value for JWT Client auth assertions ([da7d2f0](https://github.com/panva/node-openid-client/commit/da7d2f0090cd0323a14702bcca77536eb4e2b49d))
39
-
40
- ## [4.5.1](https://github.com/panva/node-openid-client/compare/v4.5.0...v4.5.1) (2021-03-15)
41
-
42
-
43
- ### Bug Fixes
44
-
45
- * use mtls token endpoint alias as audience when using jwt auth with mtls constrained tokens ([c463359](https://github.com/panva/node-openid-client/commit/c4633591ed7ebdf973b0240959078a8217beccbb))
46
-
47
- ## [4.5.0](https://github.com/panva/node-openid-client/compare/v4.4.2...v4.5.0) (2021-03-10)
48
-
49
-
50
- ### Features
51
-
52
- * include `nbf` in FAPIClient Request Objects ([0be56ba](https://github.com/panva/node-openid-client/commit/0be56ba5622e0062495965f55285438542da614e))
53
-
54
- ## [4.4.2](https://github.com/panva/node-openid-client/compare/v4.4.1...v4.4.2) (2021-03-07)
55
-
56
-
57
- ### Bug Fixes
58
-
59
- * resolve discovery URIs one by one to yield consistent results ([6b18218](https://github.com/panva/node-openid-client/commit/6b18218cfa098195ec8442086221a88fa6aef654)), closes [#260](https://github.com/panva/node-openid-client/issues/260) [#267](https://github.com/panva/node-openid-client/issues/267)
60
-
61
- ## [4.4.1](https://github.com/panva/node-openid-client/compare/v4.4.0...v4.4.1) (2021-02-26)
62
-
63
-
64
- ### Bug Fixes
65
-
66
- * hide AggregateError message stack ([3011cca](https://github.com/panva/node-openid-client/commit/3011ccabc63e670adcee432b6565d10b55554865)), closes [#336](https://github.com/panva/node-openid-client/issues/336)
67
-
68
- ## [4.4.0](https://github.com/panva/node-openid-client/compare/v4.3.0...v4.4.0) (2021-01-29)
69
-
70
-
71
- ### Features
72
-
73
- * allow options.https.pfx for mTSL ([075cad7](https://github.com/panva/node-openid-client/commit/075cad73a28d825128e6c92d44e7dba556b6a6f4)), closes [#326](https://github.com/panva/node-openid-client/issues/326)
74
-
75
- ## [4.3.0](https://github.com/panva/node-openid-client/compare/v4.2.3...v4.3.0) (2021-01-22)
76
-
77
-
78
- ### Features
79
-
80
- * **typescript:** add userinfo response generics ([b176b2f](https://github.com/panva/node-openid-client/commit/b176b2f9161be77082c520ab532c237380abda22))
81
-
82
- ## [4.2.3](https://github.com/panva/node-openid-client/compare/v4.2.2...v4.2.3) (2021-01-18)
83
-
84
-
85
- ### Performance
86
-
87
- * use base64url encoding in node when available ([24ab5b4](https://github.com/panva/node-openid-client/commit/24ab5b46c688cd1dd3679fe61a9de668c87e656b))
88
-
89
- ## [4.2.2](https://github.com/panva/node-openid-client/compare/v4.2.1...v4.2.2) (2020-11-30)
90
-
91
-
92
- ### Bug Fixes
93
-
94
- * push pkce <> response type resolution to the authenticate function ([1970af4](https://github.com/panva/node-openid-client/commit/1970af41dc0cd62d44efb1f0a48bdc2a70bcd608)), closes [#312](https://github.com/panva/node-openid-client/issues/312)
95
-
96
- ## [4.2.1](https://github.com/panva/node-openid-client/compare/v4.2.0...v4.2.1) (2020-10-27)
97
-
98
-
99
- ### Bug Fixes
100
-
101
- * **typescript:** add state property to AuthorizationParameters ([#305](https://github.com/panva/node-openid-client/issues/305)) ([b9dfa60](https://github.com/panva/node-openid-client/commit/b9dfa6064d7823ab0bb3eed486a3a5c7ad452982)), closes [#304](https://github.com/panva/node-openid-client/issues/304)
102
-
103
- ## [4.2.0](https://github.com/panva/node-openid-client/compare/v4.1.1...v4.2.0) (2020-10-03)
104
-
105
-
106
- ### Features
107
-
108
- * add callback extras to strategy options ([#295](https://github.com/panva/node-openid-client/issues/295)) ([b77466d](https://github.com/panva/node-openid-client/commit/b77466ddb597accdb783bad07566f28db0d2c827))
109
-
110
- ## [4.1.1](https://github.com/panva/node-openid-client/compare/v4.1.0...v4.1.1) (2020-09-14)
111
-
112
-
113
- ### Bug Fixes
114
-
115
- * **typescript:** ts module interop issues with default export ([6ca57d0](https://github.com/panva/node-openid-client/commit/6ca57d0ef08c188c1da7f3c980b74ba3abf33966)), closes [#291](https://github.com/panva/node-openid-client/issues/291)
116
-
117
- ## [4.1.0](https://github.com/panva/node-openid-client/compare/v4.0.2...v4.1.0) (2020-09-11)
118
-
119
-
120
- ### Features
121
-
122
- * OAuth 2.0 DPoP in various relevant API interfaces ([44a0de7](https://github.com/panva/node-openid-client/commit/44a0de7ceb62cabacd62798ac136f1c394907028))
123
-
124
- ## [4.0.2](https://github.com/panva/node-openid-client/compare/v4.0.1...v4.0.2) (2020-09-11)
125
-
126
-
127
- ### Bug Fixes
128
-
129
- * updated request object mime-type as per draft-ietf-oauth-jwsreq-30 ([d5cc619](https://github.com/panva/node-openid-client/commit/d5cc619cbf137c42898229546e44b8f065af6e3f))
130
-
131
- ## [4.0.1](https://github.com/panva/node-openid-client/compare/v4.0.0...v4.0.1) (2020-09-10)
132
-
133
-
134
- ### Bug Fixes
135
-
136
- * ensure minimal got version handles upcoming node version changes ([fd737a3](https://github.com/panva/node-openid-client/commit/fd737a3598c29d7069328156e06b23d08c1f50c6))
137
-
138
- ## [4.0.0](https://github.com/panva/node-openid-client/compare/v3.15.10...v4.0.0) (2020-09-09)
139
-
140
-
141
- ### ⚠ BREAKING CHANGES
142
-
143
- * the deprecated `issuer.key()` method was removed
144
- * due to added ESM module support Node.js version with
145
- ESM implementation bugs are no longer supported, this only affects early
146
- v13.x versions. The resulting Node.js semver range is
147
- `^10.19.0 || >=12.0.0 < 13 || >=13.7.0` (also taking into account the
148
- `got` dependency update)
149
- * upgraded got http request library dependency from
150
- `v9.x` to `v11.x`. If you override some of the http request options
151
- you will most certainly have to accomodate them.
152
- * Signed Request Object "typ" changed from `JWT` to
153
- `oauth.authz.req+jwt`
154
- * Encrypted Request Object "cty" changed from `JWT` to
155
- `oauth.authz.req+jwt`
156
- * PKCE is now used by default in the passport strategy
157
- * `client.userinfo()` `verb` parameter was renamed to
158
- `method`
159
- * the deprecated `client.resource()` method was removed
160
-
161
- ### Features
162
-
163
- * added support for ESM (ECMAScript modules) ([3ac37e8](https://github.com/panva/node-openid-client/commit/3ac37e80d66d47e9814972ed86d1323b9ee96b79))
164
- * passport strategy will now use PKCE by default where applicable ([56f9fe7](https://github.com/panva/node-openid-client/commit/56f9fe7171ccc1bec6427d4f9bc45e419150ab4d))
165
-
166
-
167
- ### Bug Fixes
168
-
169
- * request object type changed from 'JWT' to 'oauth.authz.req+jwt' ([641a42f](https://github.com/panva/node-openid-client/commit/641a42fdd3097289085340afab652e4b8b9f571c))
170
-
171
-
172
- ### Refactor
173
-
174
- * remove deprecated `client.resource()` ([c0ec865](https://github.com/panva/node-openid-client/commit/c0ec8652673c7b276a7c71eb2d730eb3feb22eeb))
175
- * remove deprecated `issuer.key()` ([5cd1ecf](https://github.com/panva/node-openid-client/commit/5cd1ecfced358c7a685d9dc29aa451a9ef13b770))
176
- * rename `client.userinfo()` `verb` parameter to `method` ([4cb21a4](https://github.com/panva/node-openid-client/commit/4cb21a4c2aef6421fe7a0f67d45baf209989cdd4))
177
- * upgrade got from v9.x to v11.x ([c72b5e8](https://github.com/panva/node-openid-client/commit/c72b5e812f6a94a92e008facefa72c366728d4a5))
178
-
179
- ## [3.15.10](https://github.com/panva/node-openid-client/compare/v3.15.9...v3.15.10) (2020-09-02)
180
-
181
-
182
- ### Bug Fixes
183
-
184
- * **typescript:** add missing types ([#284](https://github.com/panva/node-openid-client/issues/284)) ([49e0ff0](https://github.com/panva/node-openid-client/commit/49e0ff0c695cabd54148bc8a83611dd4ef6ed47c))
185
-
186
- ## [3.15.9](https://github.com/panva/node-openid-client/compare/v3.15.8...v3.15.9) (2020-07-26)
187
-
188
-
189
- ### Bug Fixes
190
-
191
- * **typescript:** max_age in AuthorizationParameters is a number ([5ce2a73](https://github.com/panva/node-openid-client/commit/5ce2a733890dba6ba2bc2f8f296a4235c0c5cdd6)), closes [#279](https://github.com/panva/node-openid-client/issues/279)
192
-
193
-
194
-
195
- ## [3.15.8](https://github.com/panva/node-openid-client/compare/v3.15.7...v3.15.8) (2020-07-17)
196
-
197
-
198
- ### Bug Fixes
199
-
200
- * allow AAD appid including discovery URLs to be multi-tenant ([c27caab](https://github.com/panva/node-openid-client/commit/c27caab9b9df92b591c4f0491fd2ec346ff48988))
201
-
202
-
203
-
204
- ## [3.15.7](https://github.com/panva/node-openid-client/compare/v3.15.6...v3.15.7) (2020-07-16)
205
-
206
-
207
-
208
- ## [3.15.6](https://github.com/panva/node-openid-client/compare/v3.15.5...v3.15.6) (2020-07-06)
209
-
210
-
211
- ### Bug Fixes
212
-
213
- * merge helper returns modified object, leftovers removed ([2e3339b](https://github.com/panva/node-openid-client/commit/2e3339bd82297d6e37574e007b8a443087f3291e))
214
-
215
-
216
-
217
- ## [3.15.5](https://github.com/panva/node-openid-client/compare/v3.15.4...v3.15.5) (2020-06-26)
218
-
219
-
220
- ### Bug Fixes
221
-
222
- * regression from [#272](https://github.com/panva/node-openid-client/issues/272) ([9bff960](https://github.com/panva/node-openid-client/commit/9bff960bda42fd8af7b8569f121ca35c7f4cfae4))
223
-
224
-
225
-
226
- ## [3.15.4](https://github.com/panva/node-openid-client/compare/v3.15.3...v3.15.4) (2020-06-26)
227
-
228
-
229
-
230
- ## [3.15.3](https://github.com/panva/node-openid-client/compare/v3.15.2...v3.15.3) (2020-06-15)
231
-
232
-
233
- ### Bug Fixes
234
-
235
- * give AAD v1 common same treatment as v2 common ([2344e00](https://github.com/panva/node-openid-client/commit/2344e006fd4086d0df8391f9ef95cce25299e45f)), closes [#269](https://github.com/panva/node-openid-client/issues/269)
236
-
237
-
238
-
239
- ## [3.15.2](https://github.com/panva/node-openid-client/compare/v3.15.1...v3.15.2) (2020-06-01)
240
-
241
-
242
- ### Bug Fixes
243
-
244
- * allow any JSON numeric value for timestamp values ([a24a759](https://github.com/panva/node-openid-client/commit/a24a7596c038bacd5bdbfc5b8678a96e62b86fd2)), closes [#263](https://github.com/panva/node-openid-client/issues/263)
245
-
246
-
247
-
248
- ## [3.15.1](https://github.com/panva/node-openid-client/compare/v3.15.0...v3.15.1) (2020-05-12)
249
-
250
-
251
- ### Bug Fixes
252
-
253
- * A192CBC-HS384 and A256CBC-HS512 direct encryption key derivation ([c356bbe](https://github.com/panva/node-openid-client/commit/c356bbeaba1e28b6a56534b9ba503cb536c14d57))
254
-
255
-
256
-
257
- ## [3.15.0](https://github.com/panva/node-openid-client/compare/v3.14.2...v3.15.0) (2020-04-28)
258
-
259
-
260
- ### Features
261
-
262
- * add RPError indicators for unix timestamp comparison failures ([fe3db5c](https://github.com/panva/node-openid-client/commit/fe3db5c46a04cab024901782f202d08234b4cd96)), closes [#250](https://github.com/panva/node-openid-client/issues/250)
263
-
264
-
265
-
266
- ## [3.14.2](https://github.com/panva/node-openid-client/compare/v3.14.1...v3.14.2) (2020-04-07)
267
-
268
-
269
- ### Bug Fixes
270
-
271
- * **typescript:** add options arg to TypeOfGenericClient ([b97b028](https://github.com/panva/node-openid-client/commit/b97b0288d5d79f25cad3d0009212878c5d42a2e0))
272
-
273
-
274
-
275
- ## [3.14.1](https://github.com/panva/node-openid-client/compare/v3.14.0...v3.14.1) (2020-03-21)
276
-
277
-
278
- ### Bug Fixes
279
-
280
- * assert refresh_token grant ID Token sub to equal previous ([23f3f9f](https://github.com/panva/node-openid-client/commit/23f3f9fcb88c157cf9bbfa7cc2444e07f0cedc18))
281
-
282
-
283
-
284
- ## [3.14.0](https://github.com/panva/node-openid-client/compare/v3.13.0...v3.14.0) (2020-02-28)
285
-
286
-
287
- ### Features
288
-
289
- * support additional authorized parties ([c9268ce](https://github.com/panva/node-openid-client/commit/c9268ce24c0080729652d7ba67a7f313227dc815)), closes [#231](https://github.com/panva/node-openid-client/issues/231)
290
-
291
-
292
-
293
- ## [3.13.0](https://github.com/panva/node-openid-client/compare/v3.12.2...v3.13.0) (2020-02-18)
294
-
295
-
296
- ### Features
297
-
298
- * add support for RSA-OAEP-384 and RSA-OAEP-512 JWE algorithms ([6c696e9](https://github.com/panva/node-openid-client/commit/6c696e98202af2a358fde72bd0718c7dff7f3a96))
299
-
300
-
301
-
302
- ## [3.12.2](https://github.com/panva/node-openid-client/compare/v3.12.1...v3.12.2) (2020-01-30)
303
-
304
-
305
- ### Bug Fixes
306
-
307
- * ensure jose version that handles ECDH-ES for larger key sizes right ([e91001a](https://github.com/panva/node-openid-client/commit/e91001a30e0c429ef5bb49e0fda58a54f765c346))
308
-
309
-
310
-
311
- ## [3.12.1](https://github.com/panva/node-openid-client/compare/v3.12.0...v3.12.1) (2020-01-25)
312
-
313
-
314
- ### Bug Fixes
315
-
316
- * allow multiple keys to match when selecting encryption key for request object ([fa3fa67](https://github.com/panva/node-openid-client/commit/fa3fa677709f4e229c6356896731416feff71509))
317
-
318
-
319
-
320
- ## [3.12.0](https://github.com/panva/node-openid-client/compare/v3.11.0...v3.12.0) (2020-01-23)
321
-
322
-
323
- ### Bug Fixes
324
-
325
- * allow omitting the `*_enc` attributes (default 'A128CBC-HS256') ([6567c73](https://github.com/panva/node-openid-client/commit/6567c73996ba247d1bd46796d37a32ffa93d74a5))
326
-
327
-
328
- ### Features
329
-
330
- * new API for fetching arbitrary resources with the access token ([c981ed6](https://github.com/panva/node-openid-client/commit/c981ed68e5cb0a53f064eb27604d8790ef3dac91)), closes [#222](https://github.com/panva/node-openid-client/issues/222)
331
-
332
-
333
-
334
- ## [3.11.0](https://github.com/panva/node-openid-client/compare/v3.10.1...v3.11.0) (2020-01-10)
335
-
336
-
337
- ### Bug Fixes
338
-
339
- * **typescript:** allow 'id_token token' as a response type ([61c486c](https://github.com/panva/node-openid-client/commit/61c486c2b800c9299f4eaf3649711c39a6e5ce57))
340
-
341
-
342
- ### Features
343
-
344
- * detect self-issued OP and validate ID Token accordingly ([c5d3158](https://github.com/panva/node-openid-client/commit/c5d315826a767d1479509931eddb5ae6e3b99532)), closes [#220](https://github.com/panva/node-openid-client/issues/220) [#221](https://github.com/panva/node-openid-client/issues/221)
345
-
346
-
347
-
348
- ## [3.10.1](https://github.com/panva/node-openid-client/compare/v3.10.0...v3.10.1) (2020-01-07)
349
-
350
-
351
- ### Bug Fixes
352
-
353
- * allow duplicate "kid" values in issuer's jwks_uri (sigh) ([8840fb6](https://github.com/panva/node-openid-client/commit/8840fb6e9cb2b3f8e6396b596ff90f8f080e7f7a))
354
-
355
-
356
-
357
- ## [3.10.0](https://github.com/panva/node-openid-client/compare/v3.9.2...v3.10.0) (2019-12-27)
358
-
359
-
360
- ### Bug Fixes
361
-
362
- * enabled full JWT validation on distributed and aggregated claims ([d95e31b](https://github.com/panva/node-openid-client/commit/d95e31bf33bf3dc9a90e420a6dc90bbfd964d885))
363
-
364
-
365
- ### Features
366
-
367
- * allow consuming JARM responses (jwt response mode) ([dd4aae9](https://github.com/panva/node-openid-client/commit/dd4aae92eafbdde5ac11c2d7d422d150ceed45da))
368
-
369
-
370
-
371
- ## [3.9.2](https://github.com/panva/node-openid-client/compare/v3.9.1...v3.9.2) (2019-12-17)
372
-
373
-
374
- ### Bug Fixes
375
-
376
- * skip validating iat is in the past ([0791001](https://github.com/panva/node-openid-client/commit/0791001a6e0244ac3fbde8b9e6cf206d97f82fbe))
377
-
378
-
379
-
380
- ## [3.9.1](https://github.com/panva/node-openid-client/compare/v3.9.0...v3.9.1) (2019-12-15)
381
-
382
-
383
- ### Bug Fixes
384
-
385
- * remove check for nonce presence in params ([cac46fb](https://github.com/panva/node-openid-client/commit/cac46fb1846c853f6c519beddd5ab5bdaf0770b1))
386
-
387
-
388
-
389
- ## [3.9.0](https://github.com/panva/node-openid-client/compare/v3.8.4...v3.9.0) (2019-12-06)
390
-
391
-
392
- ### Bug Fixes
393
-
394
- * check for mTLS request options during token_endpoint calls ([269569f](https://github.com/panva/node-openid-client/commit/269569fbb08139694589f1b27bda690b8d8474fe))
395
- * **typescript:** complete http options ([3997687](https://github.com/panva/node-openid-client/commit/3997687cc68bf76bc92ac143c5e5fe3b9cbd3914))
396
-
397
-
398
- ### Features
399
-
400
- * added API for fetching any resource ([ae242a5](https://github.com/panva/node-openid-client/commit/ae242a5c058386a3607af4a662dbf696938bc6f1))
401
- * added issuer.FAPIClient for FAPI RW integrations ([ab88aa5](https://github.com/panva/node-openid-client/commit/ab88aa590fb5a853ddbd8273a713bf142a9f5049))
402
-
403
-
404
-
405
- ## [3.8.4](https://github.com/panva/node-openid-client/compare/v3.8.3...v3.8.4) (2019-11-26)
406
-
407
-
408
- ### Bug Fixes
409
-
410
- * use shake256(m, 114) for Ed448 ID Token _hash claims ([80311c8](https://github.com/panva/node-openid-client/commit/80311c89273d9e2577dc694f1ac91a00944cc026))
411
-
412
-
413
-
414
- ## [3.8.3](https://github.com/panva/node-openid-client/compare/v3.8.2...v3.8.3) (2019-11-14)
415
-
416
-
417
-
418
- ## [3.8.2](https://github.com/panva/node-openid-client/compare/v3.8.1...v3.8.2) (2019-11-10)
419
-
420
-
421
- ### Bug Fixes
422
-
423
- * assert jwks is present for private_key_jwk first ([c1f875c](https://github.com/panva/node-openid-client/commit/c1f875c0c4a472b2dc424bc9de21a9cbdc8ca8ad))
424
-
425
-
426
-
427
- ## [3.8.1](https://github.com/panva/node-openid-client/compare/v3.8.0...v3.8.1) (2019-11-07)
428
-
429
-
430
- ### Bug Fixes
431
-
432
- * use sha512 for Ed25519 and shake256 for Ed448 ID Token _hash claims ([31f7a04](https://github.com/panva/node-openid-client/commit/31f7a040c289e7fd389a0083803f2998bf62b660))
433
-
434
-
435
-
436
- ## [3.8.0](https://github.com/panva/node-openid-client/compare/v3.7.4...v3.8.0) (2019-11-07)
437
-
438
-
439
- ### Features
440
-
441
- * allow tokenType for userinfo to use as authorization header scheme ([4eaa75f](https://github.com/panva/node-openid-client/commit/4eaa75f714a744f9e712615dedc6702f4f9b7a64))
442
-
443
-
444
-
445
- ## [3.7.4](https://github.com/panva/node-openid-client/compare/v3.7.3...v3.7.4) (2019-10-24)
446
-
447
-
448
- ### Bug Fixes
449
-
450
- * allow distributed claims to be missing from the response ([48d6633](https://github.com/panva/node-openid-client/commit/48d6633af2bb5d724c2fee2628fdfc871324bb94)), closes [#197](https://github.com/panva/node-openid-client/issues/197)
451
-
452
-
453
-
454
- ## [3.7.3](https://github.com/panva/node-openid-client/compare/v3.7.2...v3.7.3) (2019-10-01)
455
-
456
-
457
- ### Bug Fixes
458
-
459
- * use updated jose package ([1f3a251](https://github.com/panva/node-openid-client/commit/1f3a251))
460
-
461
-
462
-
463
- ## [3.7.2](https://github.com/panva/node-openid-client/compare/v3.7.1...v3.7.2) (2019-09-13)
464
-
465
-
466
- ### Bug Fixes
467
-
468
- * **typescript:** add missing Strategy interface properties ([c0d59c4](https://github.com/panva/node-openid-client/commit/c0d59c4)), closes [#189](https://github.com/panva/node-openid-client/issues/189)
469
-
470
-
471
-
472
- ## [3.7.1](https://github.com/panva/node-openid-client/compare/v3.7.0...v3.7.1) (2019-09-09)
473
-
474
-
475
- ### Bug Fixes
476
-
477
- * **typescript:** remove the need for @types/got dependency ([e5a50d7](https://github.com/panva/node-openid-client/commit/e5a50d7))
478
-
479
-
480
-
481
- ## [3.7.0](https://github.com/panva/node-openid-client/compare/v3.6.2...v3.7.0) (2019-09-09)
482
-
483
-
484
- ### Bug Fixes
485
-
486
- * assert client_secret is present when required, require client_id, etc ([82855a5](https://github.com/panva/node-openid-client/commit/82855a5))
487
-
488
-
489
- ### Features
490
-
491
- * Add Typescript definitions ([#184](https://github.com/panva/node-openid-client/issues/184)) ([c37130b](https://github.com/panva/node-openid-client/commit/c37130b))
492
- * allow clientAssertionPayload to overwrite default payload ([28c8964](https://github.com/panva/node-openid-client/commit/28c8964))
493
-
494
-
495
-
496
- ## [3.6.2](https://github.com/panva/node-openid-client/compare/v3.6.1...v3.6.2) (2019-09-03)
497
-
498
-
499
- ### Bug Fixes
500
-
501
- * device authorization request always pushes the client_id to body ([6fbf125](https://github.com/panva/node-openid-client/commit/6fbf125))
502
-
503
-
504
-
505
- ## [3.6.1](https://github.com/panva/node-openid-client/compare/v3.6.0...v3.6.1) (2019-08-24)
506
-
507
-
508
- ### Bug Fixes
509
-
510
- * ignore runtime unsupported or malformed issuer jwks ([f08b8be](https://github.com/panva/node-openid-client/commit/f08b8be))
511
-
512
-
513
-
514
- ## [3.6.0](https://github.com/panva/node-openid-client/compare/v3.5.0...v3.6.0) (2019-08-24)
515
-
516
-
517
- ### Features
518
-
519
- * add RFC8628 - OAuth 2.0 Device Authorization Grant (Device Flow) support ([adb4b76](https://github.com/panva/node-openid-client/commit/adb4b76))
520
- * allow multiple resource parameters in authorization requests ([dfdd8cb](https://github.com/panva/node-openid-client/commit/dfdd8cb))
521
-
522
-
523
-
524
- ## [3.5.0](https://github.com/panva/node-openid-client/compare/v3.4.0...v3.5.0) (2019-08-22)
525
-
526
-
527
- ### Features
528
-
529
- * added Node.js lts/dubnium support for runtime supported features ([54788c2](https://github.com/panva/node-openid-client/commit/54788c2))
530
-
531
-
532
-
533
- ## [3.4.0](https://github.com/panva/node-openid-client/compare/v3.3.0...v3.4.0) (2019-08-13)
534
-
535
-
536
- ### Features
537
-
538
- * electron v6.x runtime support ([65ec619](https://github.com/panva/node-openid-client/commit/65ec619))
539
-
540
-
541
-
542
- ## [3.3.0](https://github.com/panva/node-openid-client/compare/v3.2.3...v3.3.0) (2019-08-02)
543
-
544
-
545
- ### Features
546
-
547
- * option to change http options globally ([a1e0a3f](https://github.com/panva/node-openid-client/commit/a1e0a3f))
548
-
549
-
550
-
551
- ## [3.2.3](https://github.com/panva/node-openid-client/compare/v3.2.2...v3.2.3) (2019-07-18)
552
-
553
-
554
- ### Bug Fixes
555
-
556
- * **strategy:** do not modify the params argument, clone it instead ([4731d29](https://github.com/panva/node-openid-client/commit/4731d29)), closes [#177](https://github.com/panva/node-openid-client/issues/177)
557
-
558
-
559
-
560
- ## [3.2.2](https://github.com/panva/node-openid-client/compare/v3.2.1...v3.2.2) (2019-07-12)
561
-
562
-
563
- ### Bug Fixes
564
-
565
- * give AAD v2 organizations and consumers same treatment as common ([4891b5b](https://github.com/panva/node-openid-client/commit/4891b5b)), closes [#175](https://github.com/panva/node-openid-client/issues/175)
566
-
567
-
568
-
569
- ## [3.2.1](https://github.com/panva/node-openid-client/compare/v3.2.0...v3.2.1) (2019-07-10)
570
-
571
-
572
- ### Bug Fixes
573
-
574
- * plug reported lodash vulnerability ([b690dac](https://github.com/panva/node-openid-client/commit/b690dac))
575
-
576
-
577
-
578
- ## [3.2.0](https://github.com/panva/node-openid-client/compare/v3.1.2...v3.2.0) (2019-06-27)
579
-
580
-
581
- ### Features
582
-
583
- * feat: added support for direct symmetric key encryption alg (dir) ([f1b4282](https://github.com/panva/node-openid-client/commit/f1b4282))
584
-
585
-
586
-
587
- ## [3.1.2](https://github.com/panva/node-openid-client/compare/v3.1.1...v3.1.2) (2019-06-21)
588
-
589
-
590
- ### Bug Fixes
591
-
592
- * ensure runtime @panva/jose dependency ^1.3.0 ([d992deb](https://github.com/panva/node-openid-client/commit/d992deb))
593
-
594
-
595
-
596
- ## [3.1.1](https://github.com/panva/node-openid-client/compare/v3.1.0...v3.1.1) (2019-05-15)
597
-
598
-
599
- ### Bug Fixes
600
-
601
- * passport strategy runtime authenticate parameters regression ([36e741e](https://github.com/panva/node-openid-client/commit/36e741e)), closes [#167](https://github.com/panva/node-openid-client/issues/167)
602
-
603
-
604
-
605
- ## [3.1.0](https://github.com/panva/node-openid-client/compare/v3.0.0...v3.1.0) (2019-05-13)
606
-
607
-
608
- ### Features
609
-
610
- * add helpers for generating secure random values & PKCE challenges ([44f1865](https://github.com/panva/node-openid-client/commit/44f1865))
611
-
612
-
613
-
614
- ## [3.0.0](https://github.com/panva/node-openid-client/compare/v2.5.0...v3.0.0) (2019-05-11)
615
-
616
-
617
- ### Bug Fixes
618
-
619
- * authorizationParams no longer requires nonce for `response_type=token`
620
- * issuer's auth signing algs presence is now asserted if client is missing the relevant metadata property
621
- * unintended (client|issuer).metadata[property] reassignment is no longer possible
622
- * refreshed encrypted ID Tokens are now properly decrypted
623
- * userinfo_endpoint presence on an issuer is now asserted during userinfo function call
624
- * PBES2 symmetric encryption and decryption now correctly uses the `client_secret` value rather then
625
- its SHA digest
626
- * Accept header is now correctly set for all requests
627
- * clients configured to receive signed and/or encrypted userinfo endpoints will now correctly reject
628
- a response that isn't proper `application/jwt`
629
-
630
-
631
- ### Features
632
-
633
- * **Typed Errors** - openid-client now has unique errors for HTTP transport related errors, OP/AS
634
- returned errors and RP(client-side) assertions.
635
- * **common configuration issues are now gracefully handled.** I feel like many developers may be
636
- setting properties like `redirect_uri` or `response_type` on a client instance. I sympathize and
637
- openid-client will now take these common mistakes and accomodate.
638
- * **QoL** `#client.authorizationParams()` will now attempt to resolve the `redirect_uri` and
639
- `response_type` from your client's metadata. If there's only one listed, it will be used
640
- automatically. If there's more, you must continue providing it explicitly.
641
- * **per-request http request options helper function** HTTP request options can now be modified on
642
- a per request basis for the different classes or their instances. This now allows each request's
643
- options to be altered on-demand with e.g. client mutual-TLS certificates or implementing work
644
- arounds for specific AS quirks.
645
- * **mutual-TLS client authentication** is now supported through the above mentioned helper for both
646
- client-authentication and proof-of-possession purposes.
647
- * **custom request bodies** Where the above per-request helper falls short is providing extra
648
- token endpoint exchange parameters like `resource` to authorization code or refresh token exchange,
649
- you can now pass those in the actual client methods.
650
- * **custom client assertion payloads** You can now pass extra claims to the client authenticated
651
- calls e.g. token, introspect, revoke.
652
- * **request objects are now set to be one-time use** Generated Request Objects are secure by default
653
- they include iat, exp and jti claims so that OPs have a way to make them one-time use depending on
654
- their policy.
655
- * **EdDSA support** OKP JSON Web Keys and EdDSA signing and verification is now supported.
656
-
657
-
658
- ### BREAKING CHANGES
659
- * openid-client now uses `@panva/jose` for all things JOSE. As a result of this the minimum required
660
- node version is v12.0.0 and the client will now only function in node.js environments.
661
- * `Issuer.defaultHttpOptions` getter and setter were removed. See documentation customization
662
- section for its replacement.
663
- * `client.CLOCK_TOLERANCE` client property was removed. See documentation customization section for
664
- its replacement.
665
- * `client.authorizationCallback()` has been renamed to `client.callback()`
666
- * `tokenset.claims` getter is now a function `tokenset.claims()`
667
- * `useRequest` and `useGot` methods were removed, with the maintenance mode and inevitable
668
- deprecation of the `request` module i've decided to only support got as an http request library.
669
- * Instead of passing jose library keystore instances with private keys the API now
670
- expects a JWKS formatted object. `keystore` options argument properties are now called just `jwks`.
671
- * `response_type=code` is no longer defaulted to in `#client.authorizationUrl()` if your client
672
- instance has multiple `response_types` members.
673
- * Strict `===` equality operator is now used for assertions, while unlikely the breaking change is
674
- that should some ID Token claims be correct values but incorrect type, these will start failing now.
675
- * `#client.revoke()` no longer returns or in any way processes the response body as per spec
676
- requirements.
677
- * All http(s) responses are now strictly checked for the expected http response status code.
678
- * All http(s) requests now assert that an absolute URL is being requested.
679
- * Passport Strategy will now fail when userinfo is requested via the verify callback arity but no
680
- access token is returned from the OP.
681
-
682
-
683
-
684
- ## [2.5.0](https://github.com/panva/node-openid-client/compare/v2.4.5...v2.5.0) (2019-04-29)
685
-
686
-
687
- ### Bug Fixes
688
-
689
- * key lookup cache is now working as intended ([90d2f2a](https://github.com/panva/node-openid-client/commit/90d2f2a)), closes [#162](https://github.com/panva/node-openid-client/issues/162)
690
-
691
-
692
- ### Features
693
-
694
- * add support for azure ad v2 multitenant apps ([24486dd](https://github.com/panva/node-openid-client/commit/24486dd)), closes [#148](https://github.com/panva/node-openid-client/issues/148)
695
-
696
-
697
-
698
- ## [2.4.5](https://github.com/panva/node-openid-client/compare/v2.4.4...v2.4.5) (2018-11-05)
699
-
700
-
701
- ### Bug Fixes
702
-
703
- * upgrade min node-jose version to fix its performance in node ([e682dfc](https://github.com/panva/node-openid-client/commit/e682dfc))
704
-
705
-
706
-
707
- ## [2.4.4](https://github.com/panva/node-openid-client/compare/v2.4.3...v2.4.4) (2018-10-18)
708
-
709
-
710
- ### Bug Fixes
711
-
712
- * strategy code_verifier length, removed uuid dependency ([60d0cb8...ea4a8fd](https://github.com/panva/node-openid-client/compare/60d0cb8...ea4a8fd)), closes [#131](https://github.com/panva/node-openid-client/issues/131)
713
-
714
-
715
-
716
- ## [2.4.3](https://github.com/panva/node-openid-client/compare/v2.4.2...v2.4.3) (2018-10-10)
717
-
718
-
719
- ### Bug Fixes
720
-
721
- * assign Discovery 1.0 defaults when discovering with .well-known ([74b593e](https://github.com/panva/node-openid-client/commit/74b593e))
722
-
723
-
724
-
725
- ## [2.4.2](https://github.com/panva/node-openid-client/compare/v2.4.1...v2.4.2) (2018-09-27)
726
-
727
-
728
- ### Bug Fixes
729
-
730
- * non-string error responses are not treated as OpenIdConnectError ([782d464](https://github.com/panva/node-openid-client/commit/782d464)), closes [#125](https://github.com/panva/node-openid-client/issues/125)
731
-
732
-
733
-
734
- ## [2.4.1](https://github.com/panva/node-openid-client/compare/v2.4.0...v2.4.1) (2018-09-16)
735
-
736
-
737
- ### Bug Fixes
738
-
739
- * lts/boron unsupported syntax fix ([5289188](https://github.com/panva/node-openid-client/commit/5289188))
740
-
741
-
742
-
743
- ## [2.4.0](https://github.com/panva/node-openid-client/compare/v2.3.1...v2.4.0) (2018-09-16)
744
-
745
-
746
- ### Bug Fixes
747
-
748
- * OpenIdConnectError also returns session_state ([95fae3d](https://github.com/panva/node-openid-client/commit/95fae3d))
749
- * stop sending state on the authorisation code token grant ([c4c9e50](https://github.com/panva/node-openid-client/commit/c4c9e50))
750
-
751
-
752
- ### Features
753
-
754
- * add RP-Initiated Logout URL helper ([7c2e030](https://github.com/panva/node-openid-client/commit/7c2e030)), closes [#116](https://github.com/panva/node-openid-client/issues/116)
755
-
756
-
757
-
758
- ## [2.3.1](https://github.com/panva/node-openid-client/compare/v2.3.0...v2.3.1) (2018-08-23)
759
-
760
-
761
- ### Bug Fixes
762
-
763
- * apply safer, simpler www-authenticate parsing regex ([ffce55a](https://github.com/panva/node-openid-client/commit/ffce55a))
764
- * only assign Discovery 1.0 defaults when Issuer is discovered ([dca60b8](https://github.com/panva/node-openid-client/commit/dca60b8))
765
-
766
-
767
-
768
- ## [2.3.0](https://github.com/panva/node-openid-client/compare/v2.2.1...v2.3.0) (2018-08-11)
769
-
770
-
771
- ### Features
772
-
773
- * authorization response parameter checking based on response_type ([6e0ac57](https://github.com/panva/node-openid-client/commit/6e0ac57))
774
- * passport strategy automatically checks response REQUIRED params ([902eeed](https://github.com/panva/node-openid-client/commit/902eeed))
775
-
776
-
777
-
778
- # Pre standard-version Change Log
779
- ## Version 2.2.x
780
- ### Version 2.2.1
781
- - 2018-07-10 [DIFF](https://github.com/panva/node-openid-client/compare/v2.2.0...v2.2.1)
782
- - improved discovery support of custom .well-known suffixes
783
- - chores - refactoring, missing tests, cleanup
784
-
785
- ### Version 2.2.0
786
- - 2018-07-04 [DIFF](https://github.com/panva/node-openid-client/compare/v2.1.1...v2.2.0)
787
- - added support for [RFC8414 - OAuth 2.0 Authorization Server Metadata](https://tools.ietf.org/html/rfc8414)
788
- discovery
789
-
790
- ## Version 2.1.x
791
- ### Version 2.1.1
792
- - 2018-06-28 [DIFF](https://github.com/panva/node-openid-client/compare/v2.1.0...v2.1.1)
793
- - fixed handling of bearer endpoint responses with www-authenticate headers only. fixes #102
794
-
795
- ### Version 2.1.0
796
- - 2018-05-31 [DIFF](https://github.com/panva/node-openid-client/compare/v2.0.4...v2.1.0)
797
- - `node-jose` dependency bumped to major ^1.0.0 - fixes `A\d{3}GCMKW` symmetrical encryption support
798
- - dependency updates
799
-
800
- ## Version 2.0.x
801
- ### Version 2.0.4
802
- - 2018-05-25 [DIFF](https://github.com/panva/node-openid-client/compare/v2.0.3...v2.0.4)
803
- - fixed circular when serializing OpenIdConnectError
804
- - base64url dependency update
805
-
806
- ### Version 2.0.3
807
- - 2018-05-15 [DIFF](https://github.com/panva/node-openid-client/compare/v2.0.2...v2.0.3)
808
- - base64url dependency replaced
809
-
810
- ### Version 2.0.2
811
- - 2018-05-10 [DIFF](https://github.com/panva/node-openid-client/compare/v2.0.1...v2.0.2)
812
- - dependency tree updates
813
-
814
- ### Version 2.0.1
815
- - 2018-04-26 [DIFF](https://github.com/panva/node-openid-client/compare/v2.0.0...v2.0.1)
816
- - fixed `client_secret_basic` requiring the username and password tokens to be `x-www-form-urlencoded`
817
- according to https://tools.ietf.org/html/rfc6749#section-2.3.1
818
- - NOTE: Although technically a fix, this is a breaking change when used with providers that also
819
- don't currently follow the standard. A proper way of submitting client_id and client_secret using
820
- `client_secret_basic` is `Authorization: base64(formEncode(client_id):formEncode(client_secret))`.
821
- If your client_id and client_secret does contain special characters that need encoding this does not
822
- affect you. If it does, try using `client_secret_post` instead.
823
-
824
- ### Version 2.0.0
825
- - 2018-04-12 [DIFF](https://github.com/panva/node-openid-client/compare/v1.20.0...v2.0.0)
826
- - dropped support for Node.js v4.x due to its End-of-Life on [2018-04-30](https://github.com/nodejs/Release)
827
- - removed deprecated `client#grantAuth`
828
- - removed deprecated way of passing keystore directly to `Client#register`
829
- - removed support for passing client to `OpenIDConnectStrategy` as single argument, use
830
- `new Strategy({ client })` instead of `new Strategy(client)`.
831
- - fixed a bug requiring nonce to be passed for `response_type=none`
832
-
833
- ## Version 1.20.0
834
- - 2018-03-13 [DIFF](https://github.com/panva/node-openid-client/compare/v1.19.5...v1.20.0)
835
- - added documentation for `OpenIdConnectError`
836
- - added `error_uri` from IdP responses to `OpenIdConnectError` instances
837
- - fixed `OpenIdConnectError` messages to include `error_description`
838
-
839
- ## Version 1.19.x
840
- ### Version 1.19.5
841
- - 2018-03-10 [DIFF](https://github.com/panva/node-openid-client/compare/v1.19.4...v1.19.5)
842
- - `Issuer.discover` now parses the provided URI instead of just inspecting the string. #80
843
-
844
- ### Version 1.19.4
845
- - 2018-01-30 [DIFF](https://github.com/panva/node-openid-client/compare/v1.19.3...v1.19.4)
846
- - fixed edge cases of (and simplified) private id token decryption method
847
-
848
- ### Version 1.19.3
849
- - 2018-01-22 [DIFF](https://github.com/panva/node-openid-client/compare/v1.19.2...v1.19.3)
850
- - fix return values of `#authorizationCallback()` for `response_type=none` to resolve a TokenSet
851
-
852
- ### Version 1.19.2
853
- - 2018-01-16 [DIFF](https://github.com/panva/node-openid-client/compare/v1.19.1...v1.19.2)
854
- - fixed `authorizationUrl` to respect existing issuer authorization_endpoint query parameters
855
-
856
- ### Version 1.19.1
857
- - 2018-01-15 [DIFF](https://github.com/panva/node-openid-client/compare/v1.19.0...v1.19.1)
858
- - adjusted the passport state mismatch related error message to hint developers at a local setup
859
- issue
860
-
861
- ### Version 1.19.0
862
- - 2017-12-12 [DIFF](https://github.com/panva/node-openid-client/compare/v1.18.2...v1.19.0)
863
- - added maintained request wrapper and a simple api to use request instead of `got`
864
-
865
- ## Version 1.18.x
866
- ### Version 1.18.2
867
- - 2017-12-05 [DIFF](https://github.com/panva/node-openid-client/compare/v1.18.1...v1.18.2)
868
- - bumped node-jose dependency
869
-
870
- ### Version 1.18.1
871
- - 2017-11-25 [DIFF](https://github.com/panva/node-openid-client/compare/v1.18.0...v1.18.1)
872
- - fixed the order of several `assert.equal` calls to swap actual/expected descriptions
873
- - added assertion error messages for passport strategy
874
-
875
- ### Version 1.18.0
876
- - 2017-11-19 [DIFF](https://github.com/panva/node-openid-client/compare/v1.17.0...v1.18.0)
877
- - added option for the passport strategy to use PKCE
878
- - updated http request library `got` dependency
879
-
880
- ## Version 1.17.0
881
- - 2017-10-31 [DIFF](https://github.com/panva/node-openid-client/compare/v1.16.0...v1.17.0)
882
- - now uses `client_secret_post` as default for Issuer instances that do not support
883
- `client_secret_basic` but do signal support for `client_secret_post` in their discovery document
884
-
885
- ## Version 1.16.0
886
- - 2017-10-13 [DIFF](https://github.com/panva/node-openid-client/compare/v1.15.0...v1.16.0)
887
- - added `s_hash` value validation support for ID Tokens returned by authorization endpoint
888
- - fixed edge cases where valid `_hash` but from invalid sha-length was accepted
889
-
890
- ## Version 1.15.0
891
- - 2017-09-11 [DIFF](https://github.com/panva/node-openid-client/compare/v1.14.0...v1.15.0)
892
- - added support for Request Objects encrypted with symmetrical keys
893
- - fixed PBES2 encryption to use client_secret derived symmetrical key instead of its full octet value
894
-
895
- ## Version 1.14.0
896
- - 2017-09-09 [DIFF](https://github.com/panva/node-openid-client/compare/v1.13.0...v1.14.0)
897
- - added Passport Strategy `passReqToCallback` option, defaults to false
898
-
899
- ## Version 1.13.0
900
- - 2017-08-24 [DIFF](https://github.com/panva/node-openid-client/compare/v1.12.1...v1.13.0)
901
- - added an optional keystore argument to `Client#fromUri(uri, token, [keystore])` to pass a keystore
902
- with private asymmetrical keys
903
- - fixed keystore check during constructor `Client#new` calls to check that only private asymmetrical
904
- keys are added
905
-
906
- ## Version 1.12.0
907
- ### Version 1.12.1
908
- - 2017-08-11 [DIFF](https://github.com/panva/node-openid-client/compare/v1.12.0...v1.12.1)
909
- - explicitly specified accepted response type via `accept: application/json` header
910
- - added state to token_endpoint calls for servers supporting mixup mitigation
911
-
912
- ### Version 1.12.0
913
- - 2017-07-17 [DIFF](https://github.com/panva/node-openid-client/compare/v1.11.1...v1.12.0)
914
- - Allow session key to be specified in passport strategy options
915
-
916
- ## Version 1.11.0
917
- ### Version 1.11.1
918
- - 2017-07-14 [DIFF](https://github.com/panva/node-openid-client/compare/v1.11.0...v1.11.1)
919
- - relaxed #callbackParams to allow IncomingMessage lookalikes
920
- - update internal dependencies
921
-
922
- ### Version 1.11.0
923
- - 2017-05-19 [DIFF](https://github.com/panva/node-openid-client/compare/v1.10.0...v1.11.0)
924
- - fixed default application_type from `['web']` to `'web'`
925
- - added barebones `Issuer.httpClient` setter to help advanced developers in complex environments
926
- to change the used http request client
927
-
928
- ## Version 1.10.0
929
- - 2017-05-04 [DIFF](https://github.com/panva/node-openid-client/compare/v1.9.0...v1.10.0)
930
- - added pure OAuth 2.0 stripped down callback function `#oauthCallback`
931
- - added an extra option for `#userinfo` requests to have extra params in either query or body
932
-
933
- ## Version 1.9.0
934
- - 2017-04-30 [DIFF](https://github.com/panva/node-openid-client/compare/v1.8.2...v1.9.0)
935
- - added introspection/revocation specific client and issuer properties. To remain backwards
936
- compatible they default to their token endpoint counterparts
937
- - issuer.revocation_endpoint_auth_methods_supported
938
- - issuer.introspection_endpoint_auth_methods_supported
939
- - issuer.revocation_endpoint_auth_signing_alg_values_supported
940
- - issuer.introspection_endpoint_auth_signing_alg_values_supported
941
- - client.revocation_endpoint_auth_method
942
- - client.introspection_endpoint_auth_method
943
- - client.revocation_endpoint_auth_signing_alg
944
- - client.introspection_endpoint_auth_signing_alg
945
-
946
- ## Version 1.8.0
947
- ### Version 1.8.2
948
- - 2017-04-29 [DIFF](https://github.com/panva/node-openid-client/compare/v1.8.0...v1.8.2)
949
- - bumped node-jose dependency to avoid github tar.gz dependencies
950
- - adjusted token_endpoint_auth_method=none to how it should be
951
-
952
- ### Version 1.8.0
953
- - 2017-04-07 [DIFF](https://github.com/panva/node-openid-client/compare/v1.7.2...v1.8.0)
954
- - Issuer and Client now recognize custom properties, this is so that new Registry Contents do not
955
- require a new release of openid-client to be picked up. Custom properties are exposed as getters
956
- so long as they do not interfere with the object's Prototype and they are always available in
957
- `#metadata` getter.
958
-
959
- ## Version 1.7.0
960
- ### Version 1.7.2
961
- - 2017-03-28 [DIFF](https://github.com/panva/node-openid-client/compare/v1.7.1...v1.7.2)
962
- - added missing check for webfinger issuer location protocol
963
-
964
- ### Version 1.7.1
965
- - 2017-03-28 [DIFF](https://github.com/panva/node-openid-client/compare/v1.6.4...v1.7.1)
966
- - added authorizationCallback support for submitting code_verifier
967
- - example now includes session management OP and RP frames
968
-
969
- 1.7.0 failed to publish properly, use 1.7.1 instead
970
-
971
- ## Version 1.6.0
972
- ### Version 1.6.4
973
- - 2017-03-14 [DIFF](https://github.com/panva/node-openid-client/compare/v1.6.3...v1.6.4)
974
- - fixed receiving (correct) empty responses from revocation endpoints (#21)
975
-
976
- ### Version 1.6.3
977
- - 2017-03-14 [DIFF](https://github.com/panva/node-openid-client/compare/v1.6.2...v1.6.3)
978
- - bumped minimum node-jose version to cover http://blog.intothesymmetry.com/2017/03/critical-vulnerability-in-json-web.html
979
-
980
- ### Version 1.6.2
981
- - 2017-03-09 [DIFF](https://github.com/panva/node-openid-client/compare/v1.6.1...v1.6.2)
982
- - fixed verify callback skipping userinfo when userinfo_endpoint is not configured (#19)
983
- - removed mandatory checks from passport strategy, allowing i.e. implicit only OPs (#19)
984
-
985
- ### Version 1.6.1
986
- - 2017-03-07 [DIFF](https://github.com/panva/node-openid-client/compare/v1.6.0...v1.6.1)
987
- - fixed verify callback skipping userinfo call when arity says it should but no access token is present (#18)
988
-
989
- ### Version 1.6.0
990
- - 2017-02-15 [DIFF](https://github.com/panva/node-openid-client/compare/v1.5.3...v1.6.0)
991
- - added at_hash presence assertion for applicable (implicit) ID Token validation
992
- - added c_hash presence assertion for applicable (hybrid) ID Token validation from the authorization_endpoint
993
-
994
- ## Version 1.5.0
995
- ### Version 1.5.3
996
- - 2017-02-15 [DIFF](https://github.com/panva/node-openid-client/compare/v1.5.2...v1.5.3)
997
- - fixed an ID Token validation for ID Token returned by Token Endpoint that includes c_hash
998
-
999
- ### Version 1.5.2
1000
- - 2017-02-01 [DIFF](https://github.com/panva/node-openid-client/compare/v1.5.1...v1.5.2)
1001
- - fixed passport strategy, have it use prototype instead of ES6 class syntax
1002
-
1003
- ### Version 1.5.1
1004
- - 2017-01-29 [DIFF](https://github.com/panva/node-openid-client/compare/v1.5.0...v1.5.1)
1005
- - fixed client_assertion aud claim for `_jwt` auth methods when used in introspection and revocation
1006
-
1007
- ### Version 1.5.0
1008
- - 2017-01-26 [DIFF](https://github.com/panva/node-openid-client/compare/v1.4.0...v1.5.0)
1009
- - added a passport.js strategy
1010
- - added missing max_age, default_max_age related functionality
1011
- - authorizationCallback now supports max_age check
1012
- - clients with default_max_age use this default value automatically
1013
- - when max_age is checked auth_time claim is mandatory and must be a number
1014
- - added missing require_auth_time related functionality
1015
- - clients with require_auth_time = true have the presence and format of auth_time claim validated
1016
- - authorizationUrl and authorizationPost now removes null and undefined values and ensures parameters
1017
- are stringified before passed to url.format
1018
- - added client.CLOCK_TOLERANCE property, to allow for clock skew (in seconds)
1019
-
1020
- ## Version 1.4.0
1021
- - 2017-01-10 [DIFF](https://github.com/panva/node-openid-client/compare/v1.3.1...v1.4.0)
1022
- - deprecated passing keystore directly to Client#register, pass an object with keystore property instead
1023
- - added the option to provide InitialAccessToken value to Client#register
1024
-
1025
- ## Version 1.3.0
1026
- ### Version 1.3.1
1027
- - 2016-12-18 [DIFF](https://github.com/panva/node-openid-client/compare/v1.3.0...v1.3.1)
1028
- - added error messages when expected response is missing
1029
-
1030
- ### Version 1.3.0
1031
- - 2016-12-13 [DIFF](https://github.com/panva/node-openid-client/compare/v1.2.0...v1.3.0)
1032
- - added `#requestObject` method to Client to return signed and/or encrypted Request Object
1033
-
1034
- ## Version 1.2.0
1035
- - 2016-12-09 [DIFF](https://github.com/panva/node-openid-client/compare/v1.1.0...v1.2.0)
1036
- - added `#claims` getter to TokenSets returned from `authorizationCallback` and `refresh`;
1037
-
1038
- ## Version 1.1.0
1039
- - 2016-11-23 [DIFF](https://github.com/panva/node-openid-client/compare/v1.0.2...v1.1.0)
1040
- - fixed unpacking aggregated claims with alg=none and no iss claim
1041
- - fetching distributed claims now expects a JWT response, previously expected invalid OP responses
1042
-
1043
- ## Version 1.0.0
1044
- ### Version 1.0.2
1045
- - 2016-11-22 [DIFF](https://github.com/panva/node-openid-client/compare/v1.0.1...v1.0.2)
1046
- - fixed signed userinfo response validation in case iss, aud and similar ID Token claims are missing
1047
-
1048
- ### Version 1.0.1
1049
- - 2016-11-18 [DIFF](https://github.com/panva/node-openid-client/compare/v1.0.0...v1.0.1)
1050
- - Updated uuid dependency
1051
-
1052
- ### Version 1.0.0
1053
- RP test tools are passing, no changes required from the library, API is declared stable, hence 1.0.0
1054
- release.
1055
-
1056
- - 2016-11-16 [DIFF](https://github.com/panva/node-openid-client/compare/v0.7.0...v1.0.0)
1057
- - See [1.x migration](#migrating-from-0x-to-10) to update your 0.x deployment into 1.x.
1058
-
1059
- ## Migrating from 0.x to 1.0
1060
-
1061
- 1. update your package.json file to `"^1.0.0"`
1062
- 2. sit back and relax, no breaking changes
1063
-
1064
- ## pre 1.x changelog
1065
-
1066
- 4. Major version zero (0.y.z) is for initial development. Anything may change at any time.
1067
- The public API should not be considered stable.
1068
-
1069
- 5. Version 1.0.0 defines the public API.
1070
-
1071
- - https://github.com/panva/node-openid-client/compare/v0.6.0...v0.7.0
1072
- - added: webfinger discovery
1073
- - added: callback parameter helper for node's http.IncomingMessage
1074
- - tested for lts/argon (4), lts/boron (6) and current stable (7)
1075
- - https://github.com/panva/node-openid-client/compare/v0.5.4...v0.6.0
1076
- - added: handling of symmetrically encrypted responses (A...GCMKW, A...KW, PBES2-HS...+A...KW)
1077
- - fix: state check supersedes error check, still not sure about it though
1078
- - https://github.com/panva/node-openid-client/compare/v0.5.0...v0.5.4
1079
- - added: token_type_hint for introspection and revocation
1080
- - fix: handle refresh w/o id_token
1081
- - fix: ignore nonce values when refreshing w/ id_token
1082
- - fix: validateIdToken only checks at_hash and c_hash values when TokenSet is passed in
1083
- - fix: session_state now part of returned TokenSet
1084
- - https://github.com/panva/node-openid-client/compare/v0.4.1...v0.5.0
1085
- - aggregated and distributed claim handling
1086
- - https://github.com/panva/node-openid-client/compare/v0.3.0...v0.4.1
1087
- - fix: issuer with path component discovery
1088
- - built-in signed and/or encrypted userinfo handling
1089
- - authorizationCallback handling of implicit and hybrid responses
1090
- - https://github.com/panva/node-openid-client/compare/v0.2.0...v0.3.0
1091
- - encrypted userinfo and idtoken response handling
1092
- - https://github.com/panva/node-openid-client/compare/v0.1.0...v0.2.0
1093
- - httpOptions configurable on a library level
1094
- - signed userinfo response handling