oauth2-cli 0.7.1 → 0.7.3
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/CHANGELOG.md +14 -0
- package/README.md +5 -5
- package/dist/Client.js +7 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [0.7.3](https://github.com/battis/oauth2-cli/compare/oauth2-cli/0.7.2...oauth2-cli/0.7.3) (2026-02-17)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* push past failed well-known URL ([48eca87](https://github.com/battis/oauth2-cli/commit/48eca875e9fffe30adc88ad1b5fdf0202722bb12))
|
|
11
|
+
|
|
12
|
+
## [0.7.2](https://github.com/battis/oauth2-cli/compare/oauth2-cli/0.7.1...oauth2-cli/0.7.2) (2026-02-16)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* resolve remaining requestish requests correctly ([2be680c](https://github.com/battis/oauth2-cli/commit/2be680c9575bcfe9e816e450c85b94ccf5c8f950))
|
|
18
|
+
|
|
5
19
|
## [0.7.1](https://github.com/battis/oauth2-cli/compare/oauth2-cli/0.7.0...oauth2-cli/0.7.1) (2026-02-16)
|
|
6
20
|
|
|
7
21
|
## [0.7.0](https://github.com/battis/oauth2-cli/compare/oauth2-cli/0.6.0...oauth2-cli/0.7.0) (2026-02-16)
|
package/README.md
CHANGED
|
@@ -62,10 +62,10 @@ class Client {
|
|
|
62
62
|
// ...
|
|
63
63
|
|
|
64
64
|
public async request(
|
|
65
|
-
url:
|
|
65
|
+
url: requestish.URL.ish,
|
|
66
66
|
method = 'GET',
|
|
67
67
|
body?: OpenIDClient.FetchBody,
|
|
68
|
-
headers:
|
|
68
|
+
headers: requestish.Headers.ish = {},
|
|
69
69
|
dPoPOptions?: OpenIDClient.DPoPOptions
|
|
70
70
|
) {
|
|
71
71
|
// ...
|
|
@@ -73,7 +73,7 @@ class Client {
|
|
|
73
73
|
}
|
|
74
74
|
```
|
|
75
75
|
|
|
76
|
-
[`
|
|
76
|
+
[`requestish.URL.ish`](https://www.npmjs.com/package/requestish) are more forgiving types accepting not just those specific types, but reasonable facsimiles of them.
|
|
77
77
|
|
|
78
78
|
### `requestJSON<T>()`
|
|
79
79
|
|
|
@@ -86,10 +86,10 @@ class Client {
|
|
|
86
86
|
public async requestJSON<
|
|
87
87
|
T extends OpenIDClient.JsonValue = OpenIDClient.JsonValue
|
|
88
88
|
>(
|
|
89
|
-
url:
|
|
89
|
+
url: requestish.URL.ish,
|
|
90
90
|
method = 'GET',
|
|
91
91
|
body?: OpenIDClient.FetchBody,
|
|
92
|
-
headers:
|
|
92
|
+
headers: requestish.Headers.ish = {},
|
|
93
93
|
dPoPOptions?: OpenIDClient.DPoPOptions
|
|
94
94
|
) {
|
|
95
95
|
// ...
|
package/dist/Client.js
CHANGED
|
@@ -42,7 +42,12 @@ export class Client extends EventEmitter {
|
|
|
42
42
|
*/
|
|
43
43
|
async getConfiguration() {
|
|
44
44
|
if (!this.config && this.credentials.issuer) {
|
|
45
|
-
|
|
45
|
+
try {
|
|
46
|
+
this.config = await OpenIDClient.discovery(requestish.URL.from(this.credentials.issuer), this.credentials.client_id, { client_secret: this.credentials.client_secret });
|
|
47
|
+
}
|
|
48
|
+
catch (_) {
|
|
49
|
+
// ignore error
|
|
50
|
+
}
|
|
46
51
|
}
|
|
47
52
|
if (!this.config && this.credentials?.authorization_endpoint) {
|
|
48
53
|
this.config = new OpenIDClient.Configuration({
|
|
@@ -108,7 +113,7 @@ export class Client extends EventEmitter {
|
|
|
108
113
|
? requestish.URLSearchParams.from(this.inject.search)
|
|
109
114
|
: undefined, {
|
|
110
115
|
// @ts-expect-error 2322 undocumented arg pass-through to oauth4webapi
|
|
111
|
-
headers:
|
|
116
|
+
headers: requestish.Headers.merge(this.headers, request?.headers)
|
|
112
117
|
});
|
|
113
118
|
return await this.save(token);
|
|
114
119
|
}
|
package/package.json
CHANGED