@inrupt/solid-client-authn-browser 1.17.0 → 1.17.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/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -2
- package/dist/index.mjs.map +1 -1
- package/dist/solid-client-authn.bundle.js +2 -2
- package/dist/solid-client-authn.bundle.js.map +1 -1
- package/package.json +4 -4
- package/src/login/oidc/IssuerConfigFetcher.ts +5 -2
- package/src/login/oidc/incomingRedirectHandler/AuthCodeRedirectHandler.ts +14 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inrupt/solid-client-authn-browser",
|
|
3
|
-
"version": "1.17.
|
|
3
|
+
"version": "1.17.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"browser": "dist/index.js",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"@types/uuid": "^9.0.1"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@inrupt/oidc-client-ext": "^1.17.
|
|
33
|
-
"@inrupt/solid-client-authn-core": "^1.17.
|
|
32
|
+
"@inrupt/oidc-client-ext": "^1.17.1",
|
|
33
|
+
"@inrupt/solid-client-authn-core": "^1.17.1",
|
|
34
34
|
"@inrupt/universal-fetch": "^1.0.2",
|
|
35
35
|
"events": "^3.3.0",
|
|
36
36
|
"jose": "^4.3.7",
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"publishConfig": {
|
|
40
40
|
"access": "public"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "0c27ce0ae0da67838526a538adc78b2f96f9b96b"
|
|
43
43
|
}
|
|
@@ -33,7 +33,7 @@ import type {
|
|
|
33
33
|
IStorageUtility,
|
|
34
34
|
} from "@inrupt/solid-client-authn-core";
|
|
35
35
|
import { ConfigurationError } from "@inrupt/solid-client-authn-core";
|
|
36
|
-
import { fetch } from "@inrupt/universal-fetch";
|
|
36
|
+
import { fetch as uniFetch } from "@inrupt/universal-fetch";
|
|
37
37
|
|
|
38
38
|
export const WELL_KNOWN_OPENID_CONFIG = ".well-known/openid-configuration";
|
|
39
39
|
|
|
@@ -170,7 +170,10 @@ export default class IssuerConfigFetcher implements IIssuerConfigFetcher {
|
|
|
170
170
|
// includes the full issuer path. See https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderConfig.
|
|
171
171
|
issuer.endsWith("/") ? issuer : `${issuer}/`
|
|
172
172
|
).href;
|
|
173
|
-
const issuerConfigRequestBody = await
|
|
173
|
+
const issuerConfigRequestBody = await uniFetch.call(
|
|
174
|
+
globalThis,
|
|
175
|
+
openIdConfigUrl
|
|
176
|
+
);
|
|
174
177
|
// Check the validity of the fetched config
|
|
175
178
|
try {
|
|
176
179
|
issuerConfig = processConfig(await issuerConfigRequestBody.json());
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
// being unauthenticated. This should be looked into when migrating to universal-fetch.
|
|
28
28
|
// import { fetch } from "cross-fetch";
|
|
29
29
|
|
|
30
|
-
import { fetch } from "@inrupt/universal-fetch";
|
|
30
|
+
import { fetch as uniFetch } from "@inrupt/universal-fetch";
|
|
31
31
|
|
|
32
32
|
import type {
|
|
33
33
|
IClient,
|
|
@@ -49,6 +49,9 @@ import type { CodeExchangeResult } from "@inrupt/oidc-client-ext";
|
|
|
49
49
|
import { getDpopToken, getBearerToken } from "@inrupt/oidc-client-ext";
|
|
50
50
|
import type { EventEmitter } from "events";
|
|
51
51
|
|
|
52
|
+
const globalFetch: typeof uniFetch = (...args) =>
|
|
53
|
+
uniFetch.call(globalThis, ...args);
|
|
54
|
+
|
|
52
55
|
/**
|
|
53
56
|
* @hidden
|
|
54
57
|
*/
|
|
@@ -162,12 +165,16 @@ export class AuthCodeRedirectHandler implements IIncomingRedirectHandler {
|
|
|
162
165
|
};
|
|
163
166
|
}
|
|
164
167
|
|
|
165
|
-
const authFetch = await buildAuthenticatedFetch(
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
168
|
+
const authFetch = await buildAuthenticatedFetch(
|
|
169
|
+
globalFetch,
|
|
170
|
+
tokens.accessToken,
|
|
171
|
+
{
|
|
172
|
+
dpopKey: tokens.dpopKey,
|
|
173
|
+
refreshOptions,
|
|
174
|
+
eventEmitter,
|
|
175
|
+
expiresIn: tokens.expiresIn,
|
|
176
|
+
}
|
|
177
|
+
);
|
|
171
178
|
|
|
172
179
|
await this.storageUtility.setForUser(
|
|
173
180
|
storedSessionId,
|