@inrupt/solid-client-authn-browser 1.12.4 → 1.13.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/ClientAuthentication.js +5 -1
- package/dist/ClientAuthentication.js.map +1 -1
- package/dist/login/oidc/IssuerConfigFetcher.js +1 -2
- package/dist/login/oidc/IssuerConfigFetcher.js.map +1 -1
- package/dist/login/oidc/incomingRedirectHandler/AuthCodeRedirectHandler.js +4 -0
- package/dist/login/oidc/incomingRedirectHandler/AuthCodeRedirectHandler.js.map +1 -1
- package/dist/solid-client-authn.bundle.js +1 -1
- package/package.json +4 -4
- package/src/ClientAuthentication.spec.ts +73 -21
- package/src/ClientAuthentication.ts +33 -25
- package/src/Session.spec.ts +20 -20
- package/src/Session.ts +20 -20
- package/src/__mocks__/ClientAuthentication.ts +20 -20
- package/src/constant.ts +20 -20
- package/src/defaultSession.spec.ts +20 -20
- package/src/defaultSession.ts +20 -20
- package/src/dependencies.node.spec.ts +20 -20
- package/src/dependencies.spec.ts +20 -20
- package/src/dependencies.ts +20 -20
- package/src/index.browser.spec.ts +20 -20
- package/src/index.browser.ts +20 -20
- package/src/index.spec.ts +20 -20
- package/src/index.ts +20 -20
- package/src/login/__mocks__/LoginHandler.ts +20 -20
- package/src/login/oidc/AggregateOidcHandler.spec.ts +20 -20
- package/src/login/oidc/AggregateOidcHandler.ts +20 -20
- package/src/login/oidc/AggregateRedirectHandler.ts +20 -20
- package/src/login/oidc/ClientRegistrar.spec.ts +20 -20
- package/src/login/oidc/ClientRegistrar.ts +20 -20
- package/src/login/oidc/IssuerConfigFetcher.spec.ts +20 -20
- package/src/login/oidc/IssuerConfigFetcher.ts +21 -25
- package/src/login/oidc/OidcLoginHandler.spec.ts +20 -20
- package/src/login/oidc/OidcLoginHandler.ts +20 -20
- package/src/login/oidc/Redirector.spec.ts +20 -20
- package/src/login/oidc/Redirector.ts +20 -20
- package/src/login/oidc/__mocks__/ClientRegistrar.ts +20 -20
- package/src/login/oidc/__mocks__/IOidcHandler.ts +20 -20
- package/src/login/oidc/__mocks__/IOidcOptions.ts +20 -20
- package/src/login/oidc/__mocks__/IssuerConfigFetcher.ts +20 -20
- package/src/login/oidc/__mocks__/Redirector.ts +20 -20
- package/src/login/oidc/incomingRedirectHandler/AuthCodeRedirectHandler.spec.ts +42 -20
- package/src/login/oidc/incomingRedirectHandler/AuthCodeRedirectHandler.ts +28 -20
- package/src/login/oidc/incomingRedirectHandler/ErrorOidcHandler.spec.ts +20 -20
- package/src/login/oidc/incomingRedirectHandler/ErrorOidcHandler.ts +20 -20
- package/src/login/oidc/incomingRedirectHandler/FallbackRedirectHandler.spec.ts +20 -20
- package/src/login/oidc/incomingRedirectHandler/FallbackRedirectHandler.ts +20 -20
- package/src/login/oidc/oidcHandlers/AuthorizationCodeWithPkceOidcHandler.spec.ts +20 -20
- package/src/login/oidc/oidcHandlers/AuthorizationCodeWithPkceOidcHandler.ts +20 -20
- package/src/login/oidc/oidcHandlers/OidcHandlerCanHandleTest.ts +20 -20
- package/src/login/oidc/refresh/TokenRefresher.spec.ts +20 -20
- package/src/login/oidc/refresh/TokenRefresher.ts +20 -20
- package/src/login/oidc/refresh/__mocks__/TokenRefresher.ts +20 -20
- package/src/logout/GeneralLogoutHandler.spec.ts +20 -20
- package/src/logout/GeneralLogoutHandler.ts +20 -20
- package/src/logout/__mocks__/LogoutHandler.ts +20 -20
- package/src/sessionInfo/SessionInfoManager.spec.ts +20 -20
- package/src/sessionInfo/SessionInfoManager.ts +20 -20
- package/src/sessionInfo/__mocks__/SessionInfoManager.ts +20 -20
- package/src/storage/BrowserStorage.spec.ts +20 -20
- package/src/storage/BrowserStorage.ts +20 -20
- package/src/storage/StorageUtility.ts +20 -20
- package/src/storage/__mocks__/LocalStorage.ts +20 -20
- package/src/util/UUIDGenerator.spec.ts +20 -20
- package/src/util/UuidGenerator.ts +20 -20
- package/src/util/__mocks__/UuidGenerator.ts +20 -20
- package/webpack.browser.js +20 -0
- package/webpack.common.js +20 -0
- package/webpack.config.js +20 -0
- package/webpack.dev.js +20 -0
- package/webpack.prod.js +20 -0
- package/.eslintrc.js +0 -4
- package/dist/util/urlPath.d.ts +0 -1
- package/dist/util/urlPath.js +0 -11
- package/dist/util/urlPath.js.map +0 -1
- package/src/util/urlPath.spec.ts +0 -55
- package/src/util/urlPath.ts +0 -41
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inrupt/solid-client-authn-browser",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.13.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"types": "dist/index",
|
|
6
6
|
"browser": "dist/index.js",
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"cross-fetch": "^3.1.5"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@inrupt/oidc-client-ext": "^1.
|
|
29
|
-
"@inrupt/solid-client-authn-core": "^1.
|
|
28
|
+
"@inrupt/oidc-client-ext": "^1.13.1",
|
|
29
|
+
"@inrupt/solid-client-authn-core": "^1.13.1",
|
|
30
30
|
"@types/lodash.clonedeep": "^4.5.6",
|
|
31
31
|
"@types/node": "^18.0.3",
|
|
32
32
|
"@types/uuid": "^8.3.0",
|
|
@@ -41,5 +41,5 @@
|
|
|
41
41
|
"engines": {
|
|
42
42
|
"node": "^14.0.0 || ^16.0.0"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "db1b8613648e96ef536374640421b318058551a3"
|
|
45
45
|
}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2022 Inrupt Inc.
|
|
3
|
+
//
|
|
4
|
+
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5
|
+
// of this software and associated documentation files (the "Software"), to deal in
|
|
6
|
+
// the Software without restriction, including without limitation the rights to use,
|
|
7
|
+
// copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
|
|
8
|
+
// Software, and to permit persons to whom the Software is furnished to do so,
|
|
9
|
+
// subject to the following conditions:
|
|
10
|
+
//
|
|
11
|
+
// The above copyright notice and this permission notice shall be included in
|
|
12
|
+
// all copies or substantial portions of the Software.
|
|
13
|
+
//
|
|
14
|
+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
|
15
|
+
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
|
16
|
+
// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
17
|
+
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
18
|
+
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
19
|
+
// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
20
|
+
//
|
|
21
21
|
|
|
22
22
|
import { jest, it, describe, expect, beforeEach } from "@jest/globals";
|
|
23
23
|
import { EventEmitter } from "events";
|
|
@@ -228,6 +228,58 @@ describe("ClientAuthentication", () => {
|
|
|
228
228
|
nonEmptyStorage.get("clientKey", { secure: false })
|
|
229
229
|
).resolves.toBeUndefined();
|
|
230
230
|
});
|
|
231
|
+
|
|
232
|
+
it("throws if the redirect IRI is a malformed URL", async () => {
|
|
233
|
+
const clientAuthn = getClientAuthentication();
|
|
234
|
+
await expect(() =>
|
|
235
|
+
clientAuthn.login(
|
|
236
|
+
{
|
|
237
|
+
sessionId: "someUser",
|
|
238
|
+
tokenType: "DPoP",
|
|
239
|
+
clientId: "coolApp",
|
|
240
|
+
redirectUrl: "not a valid URL",
|
|
241
|
+
oidcIssuer: "https://idp.com",
|
|
242
|
+
},
|
|
243
|
+
mockEmitter
|
|
244
|
+
)
|
|
245
|
+
).rejects.toThrow();
|
|
246
|
+
});
|
|
247
|
+
|
|
248
|
+
it("throws if the redirect IRI contains a hash fragment, with a helpful message", async () => {
|
|
249
|
+
const clientAuthn = getClientAuthentication();
|
|
250
|
+
await expect(() =>
|
|
251
|
+
clientAuthn.login(
|
|
252
|
+
{
|
|
253
|
+
sessionId: "someUser",
|
|
254
|
+
tokenType: "DPoP",
|
|
255
|
+
clientId: "coolApp",
|
|
256
|
+
redirectUrl: "https://example.org/redirect#some-fragment",
|
|
257
|
+
oidcIssuer: "https://idp.com",
|
|
258
|
+
},
|
|
259
|
+
mockEmitter
|
|
260
|
+
)
|
|
261
|
+
).rejects.toThrow("hash fragment");
|
|
262
|
+
});
|
|
263
|
+
|
|
264
|
+
it("does not normalize the redirect URL if provided by the user", async () => {
|
|
265
|
+
const clientAuthn = getClientAuthentication();
|
|
266
|
+
await clientAuthn.login(
|
|
267
|
+
{
|
|
268
|
+
sessionId: "mySession",
|
|
269
|
+
clientId: "coolApp",
|
|
270
|
+
// Note that the redirect IRI does not include a trailing slash.
|
|
271
|
+
redirectUrl: "https://example.org",
|
|
272
|
+
oidcIssuer: "https://idp.com",
|
|
273
|
+
tokenType: "Bearer",
|
|
274
|
+
},
|
|
275
|
+
mockEmitter
|
|
276
|
+
);
|
|
277
|
+
expect(defaultMocks.loginHandler.handle).toHaveBeenCalledWith(
|
|
278
|
+
expect.objectContaining({
|
|
279
|
+
redirectUrl: "https://example.org",
|
|
280
|
+
})
|
|
281
|
+
);
|
|
282
|
+
});
|
|
231
283
|
});
|
|
232
284
|
|
|
233
285
|
describe("fetch", () => {
|
|
@@ -353,7 +405,7 @@ describe("ClientAuthentication", () => {
|
|
|
353
405
|
history.replaceState = jest.fn();
|
|
354
406
|
const clientAuthn = getClientAuthentication();
|
|
355
407
|
const url =
|
|
356
|
-
"https://coolapp.com/redirect?state=someState&code=someAuthCode";
|
|
408
|
+
"https://coolapp.com/redirect?state=someState&code=someAuthCode&iss=someIssuer";
|
|
357
409
|
await clientAuthn.handleIncomingRedirect(url, mockEmitter);
|
|
358
410
|
// eslint-disable-next-line no-restricted-globals
|
|
359
411
|
expect(history.replaceState).toHaveBeenCalledWith(
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2022 Inrupt Inc.
|
|
3
|
+
//
|
|
4
|
+
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5
|
+
// of this software and associated documentation files (the "Software"), to deal in
|
|
6
|
+
// the Software without restriction, including without limitation the rights to use,
|
|
7
|
+
// copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
|
|
8
|
+
// Software, and to permit persons to whom the Software is furnished to do so,
|
|
9
|
+
// subject to the following conditions:
|
|
10
|
+
//
|
|
11
|
+
// The above copyright notice and this permission notice shall be included in
|
|
12
|
+
// all copies or substantial portions of the Software.
|
|
13
|
+
//
|
|
14
|
+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
|
15
|
+
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
|
16
|
+
// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
17
|
+
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
18
|
+
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
19
|
+
// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
20
|
+
//
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* @hidden
|
|
@@ -34,6 +34,7 @@ import {
|
|
|
34
34
|
ISessionInternalInfo,
|
|
35
35
|
ILoginOptions,
|
|
36
36
|
EVENTS,
|
|
37
|
+
isValidRedirectUrl,
|
|
37
38
|
} from "@inrupt/solid-client-authn-core";
|
|
38
39
|
import { removeOidcQueryParam } from "@inrupt/oidc-client-ext";
|
|
39
40
|
import { EventEmitter } from "events";
|
|
@@ -72,11 +73,17 @@ export default class ClientAuthentication {
|
|
|
72
73
|
|
|
73
74
|
// In the case of the user hitting the 'back' button in their browser, they
|
|
74
75
|
// could return to a previous redirect URL that contains OIDC params that
|
|
75
|
-
// are now longer valid
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
)
|
|
79
|
-
|
|
76
|
+
// are now longer valid. To be safe, strip relevant params now.
|
|
77
|
+
// If the user is providing a redirect IRI, it should not be modified, so
|
|
78
|
+
// normalization only applies if we default to the current location (which is
|
|
79
|
+
// a bad practice and should be discouraged).
|
|
80
|
+
const redirectUrl =
|
|
81
|
+
options.redirectUrl ?? removeOidcQueryParam(window.location.href);
|
|
82
|
+
if (!isValidRedirectUrl(redirectUrl)) {
|
|
83
|
+
throw new Error(
|
|
84
|
+
`${redirectUrl} is not a valid redirect URL, it is either a malformed IRI or it includes a hash fragment.`
|
|
85
|
+
);
|
|
86
|
+
}
|
|
80
87
|
await this.loginHandler.handle({
|
|
81
88
|
...options,
|
|
82
89
|
redirectUrl,
|
|
@@ -173,6 +180,7 @@ export default class ClientAuthentication {
|
|
|
173
180
|
// For login error
|
|
174
181
|
cleanedUpUrl.searchParams.delete("error");
|
|
175
182
|
cleanedUpUrl.searchParams.delete("error_description");
|
|
183
|
+
cleanedUpUrl.searchParams.delete("iss");
|
|
176
184
|
|
|
177
185
|
// Remove OAuth-specific query params (since the login flow finishes with
|
|
178
186
|
// the browser being redirected back with OAuth2 query params (e.g. for
|
package/src/Session.spec.ts
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2022 Inrupt Inc.
|
|
3
|
+
//
|
|
4
|
+
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5
|
+
// of this software and associated documentation files (the "Software"), to deal in
|
|
6
|
+
// the Software without restriction, including without limitation the rights to use,
|
|
7
|
+
// copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
|
|
8
|
+
// Software, and to permit persons to whom the Software is furnished to do so,
|
|
9
|
+
// subject to the following conditions:
|
|
10
|
+
//
|
|
11
|
+
// The above copyright notice and this permission notice shall be included in
|
|
12
|
+
// all copies or substantial portions of the Software.
|
|
13
|
+
//
|
|
14
|
+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
|
15
|
+
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
|
16
|
+
// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
17
|
+
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
18
|
+
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
19
|
+
// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
20
|
+
//
|
|
21
21
|
|
|
22
22
|
import { jest, it, describe, expect } from "@jest/globals";
|
|
23
23
|
import {
|
package/src/Session.ts
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2022 Inrupt Inc.
|
|
3
|
+
//
|
|
4
|
+
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5
|
+
// of this software and associated documentation files (the "Software"), to deal in
|
|
6
|
+
// the Software without restriction, including without limitation the rights to use,
|
|
7
|
+
// copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
|
|
8
|
+
// Software, and to permit persons to whom the Software is furnished to do so,
|
|
9
|
+
// subject to the following conditions:
|
|
10
|
+
//
|
|
11
|
+
// The above copyright notice and this permission notice shall be included in
|
|
12
|
+
// all copies or substantial portions of the Software.
|
|
13
|
+
//
|
|
14
|
+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
|
15
|
+
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
|
16
|
+
// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
17
|
+
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
18
|
+
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
19
|
+
// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
20
|
+
//
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* @hidden
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2022 Inrupt Inc.
|
|
3
|
+
//
|
|
4
|
+
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5
|
+
// of this software and associated documentation files (the "Software"), to deal in
|
|
6
|
+
// the Software without restriction, including without limitation the rights to use,
|
|
7
|
+
// copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
|
|
8
|
+
// Software, and to permit persons to whom the Software is furnished to do so,
|
|
9
|
+
// subject to the following conditions:
|
|
10
|
+
//
|
|
11
|
+
// The above copyright notice and this permission notice shall be included in
|
|
12
|
+
// all copies or substantial portions of the Software.
|
|
13
|
+
//
|
|
14
|
+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
|
15
|
+
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
|
16
|
+
// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
17
|
+
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
18
|
+
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
19
|
+
// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
20
|
+
//
|
|
21
21
|
|
|
22
22
|
import {
|
|
23
23
|
IIssuerConfigFetcher,
|
package/src/constant.ts
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2022 Inrupt Inc.
|
|
3
|
+
//
|
|
4
|
+
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5
|
+
// of this software and associated documentation files (the "Software"), to deal in
|
|
6
|
+
// the Software without restriction, including without limitation the rights to use,
|
|
7
|
+
// copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
|
|
8
|
+
// Software, and to permit persons to whom the Software is furnished to do so,
|
|
9
|
+
// subject to the following conditions:
|
|
10
|
+
//
|
|
11
|
+
// The above copyright notice and this permission notice shall be included in
|
|
12
|
+
// all copies or substantial portions of the Software.
|
|
13
|
+
//
|
|
14
|
+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
|
15
|
+
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
|
16
|
+
// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
17
|
+
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
18
|
+
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
19
|
+
// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
20
|
+
//
|
|
21
21
|
|
|
22
22
|
import { SOLID_CLIENT_AUTHN_KEY_PREFIX } from "@inrupt/solid-client-authn-core";
|
|
23
23
|
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2022 Inrupt Inc.
|
|
3
|
+
//
|
|
4
|
+
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5
|
+
// of this software and associated documentation files (the "Software"), to deal in
|
|
6
|
+
// the Software without restriction, including without limitation the rights to use,
|
|
7
|
+
// copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
|
|
8
|
+
// Software, and to permit persons to whom the Software is furnished to do so,
|
|
9
|
+
// subject to the following conditions:
|
|
10
|
+
//
|
|
11
|
+
// The above copyright notice and this permission notice shall be included in
|
|
12
|
+
// all copies or substantial portions of the Software.
|
|
13
|
+
//
|
|
14
|
+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
|
15
|
+
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
|
16
|
+
// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
17
|
+
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
18
|
+
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
19
|
+
// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
20
|
+
//
|
|
21
21
|
|
|
22
22
|
import { jest, it, expect } from "@jest/globals";
|
|
23
23
|
import {
|
package/src/defaultSession.ts
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2022 Inrupt Inc.
|
|
3
|
+
//
|
|
4
|
+
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5
|
+
// of this software and associated documentation files (the "Software"), to deal in
|
|
6
|
+
// the Software without restriction, including without limitation the rights to use,
|
|
7
|
+
// copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
|
|
8
|
+
// Software, and to permit persons to whom the Software is furnished to do so,
|
|
9
|
+
// subject to the following conditions:
|
|
10
|
+
//
|
|
11
|
+
// The above copyright notice and this permission notice shall be included in
|
|
12
|
+
// all copies or substantial portions of the Software.
|
|
13
|
+
//
|
|
14
|
+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
|
15
|
+
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
|
16
|
+
// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
17
|
+
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
18
|
+
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
19
|
+
// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
20
|
+
//
|
|
21
21
|
|
|
22
22
|
import { Session } from "./Session";
|
|
23
23
|
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2022 Inrupt Inc.
|
|
3
|
+
//
|
|
4
|
+
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5
|
+
// of this software and associated documentation files (the "Software"), to deal in
|
|
6
|
+
// the Software without restriction, including without limitation the rights to use,
|
|
7
|
+
// copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
|
|
8
|
+
// Software, and to permit persons to whom the Software is furnished to do so,
|
|
9
|
+
// subject to the following conditions:
|
|
10
|
+
//
|
|
11
|
+
// The above copyright notice and this permission notice shall be included in
|
|
12
|
+
// all copies or substantial portions of the Software.
|
|
13
|
+
//
|
|
14
|
+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
|
15
|
+
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
|
16
|
+
// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
17
|
+
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
18
|
+
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
19
|
+
// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
20
|
+
//
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* @jest-environment node
|
package/src/dependencies.spec.ts
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2022 Inrupt Inc.
|
|
3
|
+
//
|
|
4
|
+
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5
|
+
// of this software and associated documentation files (the "Software"), to deal in
|
|
6
|
+
// the Software without restriction, including without limitation the rights to use,
|
|
7
|
+
// copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
|
|
8
|
+
// Software, and to permit persons to whom the Software is furnished to do so,
|
|
9
|
+
// subject to the following conditions:
|
|
10
|
+
//
|
|
11
|
+
// The above copyright notice and this permission notice shall be included in
|
|
12
|
+
// all copies or substantial portions of the Software.
|
|
13
|
+
//
|
|
14
|
+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
|
15
|
+
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
|
16
|
+
// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
17
|
+
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
18
|
+
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
19
|
+
// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
20
|
+
//
|
|
21
21
|
|
|
22
22
|
import { describe, it, expect } from "@jest/globals";
|
|
23
23
|
import { mockStorageUtility } from "@inrupt/solid-client-authn-core";
|
package/src/dependencies.ts
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2022 Inrupt Inc.
|
|
3
|
+
//
|
|
4
|
+
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5
|
+
// of this software and associated documentation files (the "Software"), to deal in
|
|
6
|
+
// the Software without restriction, including without limitation the rights to use,
|
|
7
|
+
// copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
|
|
8
|
+
// Software, and to permit persons to whom the Software is furnished to do so,
|
|
9
|
+
// subject to the following conditions:
|
|
10
|
+
//
|
|
11
|
+
// The above copyright notice and this permission notice shall be included in
|
|
12
|
+
// all copies or substantial portions of the Software.
|
|
13
|
+
//
|
|
14
|
+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
|
15
|
+
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
|
16
|
+
// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
17
|
+
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
18
|
+
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
19
|
+
// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
20
|
+
//
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* @hidden
|