@inrupt/solid-client-authn-browser 1.11.9-alpha.0 → 1.11.9-alpha.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/dist/index.es.js +4 -352
- package/dist/index.es.js.map +1 -0
- package/dist/index.js +12 -360
- package/dist/index.js.map +1 -1
- package/dist/solid-client-authn.bundle.js +14 -363
- package/dist/solid-client-authn.bundle.js.map +1 -0
- package/package.json +8 -5
- package/.eslintrc.js +0 -16
- package/NOTICE +0 -5
- package/coverage/clover.xml +0 -547
- package/coverage/coverage-final.json +0 -28
- package/coverage/lcov-report/base.css +0 -224
- package/coverage/lcov-report/block-navigation.js +0 -87
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +0 -266
- package/coverage/lcov-report/prettify.css +0 -1
- package/coverage/lcov-report/prettify.js +0 -2
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +0 -196
- package/coverage/lcov-report/src/ClientAuthentication.ts.html +0 -631
- package/coverage/lcov-report/src/Session.ts.html +0 -1435
- package/coverage/lcov-report/src/constant.ts.html +0 -163
- package/coverage/lcov-report/src/defaultSession.ts.html +0 -460
- package/coverage/lcov-report/src/dependencies.ts.html +0 -400
- package/coverage/lcov-report/src/iframe.ts.html +0 -394
- package/coverage/lcov-report/src/index.browser.ts.html +0 -157
- package/coverage/lcov-report/src/index.html +0 -206
- package/coverage/lcov-report/src/login/AggregateLoginHandler.ts.html +0 -226
- package/coverage/lcov-report/src/login/index.html +0 -116
- package/coverage/lcov-report/src/login/oidc/AggregateOidcHandler.ts.html +0 -226
- package/coverage/lcov-report/src/login/oidc/ClientRegistrar.ts.html +0 -415
- package/coverage/lcov-report/src/login/oidc/IssuerConfigFetcher.ts.html +0 -646
- package/coverage/lcov-report/src/login/oidc/OidcLoginHandler.ts.html +0 -436
- package/coverage/lcov-report/src/login/oidc/Redirector.ts.html +0 -229
- package/coverage/lcov-report/src/login/oidc/index.html +0 -176
- package/coverage/lcov-report/src/login/oidc/oidcHandlers/AuthorizationCodeWithPkceOidcHandler.ts.html +0 -478
- package/coverage/lcov-report/src/login/oidc/oidcHandlers/OidcHandlerCanHandleTest.ts.html +0 -319
- package/coverage/lcov-report/src/login/oidc/oidcHandlers/index.html +0 -131
- package/coverage/lcov-report/src/login/oidc/redirectHandler/AggregateRedirectHandler.ts.html +0 -226
- package/coverage/lcov-report/src/login/oidc/redirectHandler/AuthCodeRedirectHandler.ts.html +0 -667
- package/coverage/lcov-report/src/login/oidc/redirectHandler/ErrorOidcHandler.ts.html +0 -283
- package/coverage/lcov-report/src/login/oidc/redirectHandler/FallbackRedirectHandler.ts.html +0 -265
- package/coverage/lcov-report/src/login/oidc/redirectHandler/index.html +0 -161
- package/coverage/lcov-report/src/login/oidc/refresh/TokenRefresher.ts.html +0 -385
- package/coverage/lcov-report/src/login/oidc/refresh/index.html +0 -116
- package/coverage/lcov-report/src/login/webid/WebIdLoginHandler.ts.html +0 -250
- package/coverage/lcov-report/src/login/webid/index.html +0 -116
- package/coverage/lcov-report/src/logout/GeneralLogoutHandler.ts.html +0 -220
- package/coverage/lcov-report/src/logout/index.html +0 -116
- package/coverage/lcov-report/src/sessionInfo/SessionInfoManager.ts.html +0 -775
- package/coverage/lcov-report/src/sessionInfo/index.html +0 -116
- package/coverage/lcov-report/src/storage/BrowserStorage.ts.html +0 -229
- package/coverage/lcov-report/src/storage/StorageUtility.ts.html +0 -214
- package/coverage/lcov-report/src/storage/index.html +0 -131
- package/coverage/lcov-report/src/util/UuidGenerator.ts.html +0 -226
- package/coverage/lcov-report/src/util/index.html +0 -131
- package/coverage/lcov-report/src/util/urlPath.ts.html +0 -208
- package/coverage/lcov.info +0 -1001
- package/dist/ClientAuthentication.js +0 -64
- package/dist/ClientAuthentication.js.map +0 -1
- package/dist/Session.js +0 -165
- package/dist/Session.js.map +0 -1
- package/dist/constant.js +0 -7
- package/dist/constant.js.map +0 -1
- package/dist/defaultSession.js +0 -48
- package/dist/defaultSession.js.map +0 -1
- package/dist/dependencies.js +0 -41
- package/dist/dependencies.js.map +0 -1
- package/dist/iframe.js +0 -43
- package/dist/iframe.js.map +0 -1
- package/dist/index.browser.d.ts +0 -1
- package/dist/index.browser.js +0 -28
- package/dist/index.browser.js.map +0 -1
- package/dist/login/AggregateLoginHandler.js +0 -10
- package/dist/login/AggregateLoginHandler.js.map +0 -1
- package/dist/login/oidc/AggregateOidcHandler.js +0 -10
- package/dist/login/oidc/AggregateOidcHandler.js.map +0 -1
- package/dist/login/oidc/ClientRegistrar.js +0 -51
- package/dist/login/oidc/ClientRegistrar.js.map +0 -1
- package/dist/login/oidc/IssuerConfigFetcher.js +0 -124
- package/dist/login/oidc/IssuerConfigFetcher.js.map +0 -1
- package/dist/login/oidc/OidcLoginHandler.js +0 -40
- package/dist/login/oidc/OidcLoginHandler.js.map +0 -1
- package/dist/login/oidc/Redirector.js +0 -21
- package/dist/login/oidc/Redirector.js.map +0 -1
- package/dist/login/oidc/__mocks__/IOidcOptions.d.ts +0 -2
- package/dist/login/oidc/__mocks__/IOidcOptions.js +0 -25
- package/dist/login/oidc/__mocks__/IOidcOptions.js.map +0 -1
- package/dist/login/oidc/oidcHandlers/AuthorizationCodeWithPkceOidcHandler.js +0 -56
- package/dist/login/oidc/oidcHandlers/AuthorizationCodeWithPkceOidcHandler.js.map +0 -1
- package/dist/login/oidc/oidcHandlers/OidcHandlerCanHandleTest.js +0 -47
- package/dist/login/oidc/oidcHandlers/OidcHandlerCanHandleTest.js.map +0 -1
- package/dist/login/oidc/redirectHandler/AggregateRedirectHandler.js +0 -10
- package/dist/login/oidc/redirectHandler/AggregateRedirectHandler.js.map +0 -1
- package/dist/login/oidc/redirectHandler/AuthCodeRedirectHandler.js +0 -92
- package/dist/login/oidc/redirectHandler/AuthCodeRedirectHandler.js.map +0 -1
- package/dist/login/oidc/redirectHandler/ErrorOidcHandler.js +0 -26
- package/dist/login/oidc/redirectHandler/ErrorOidcHandler.js.map +0 -1
- package/dist/login/oidc/redirectHandler/FallbackRedirectHandler.js +0 -20
- package/dist/login/oidc/redirectHandler/FallbackRedirectHandler.js.map +0 -1
- package/dist/login/oidc/refresh/TokenRefresher.js +0 -31
- package/dist/login/oidc/refresh/TokenRefresher.js.map +0 -1
- package/dist/login/webid/WebIdLoginHandler.js +0 -12
- package/dist/login/webid/WebIdLoginHandler.js.map +0 -1
- package/dist/logout/GeneralLogoutHandler.js +0 -15
- package/dist/logout/GeneralLogoutHandler.js.map +0 -1
- package/dist/sessionInfo/SessionInfoManager.js +0 -95
- package/dist/sessionInfo/SessionInfoManager.js.map +0 -1
- package/dist/solid-client-authn.bundle.js.LICENSE.txt +0 -17
- package/dist/storage/BrowserStorage.js +0 -18
- package/dist/storage/BrowserStorage.js.map +0 -1
- package/dist/storage/StorageUtility.js +0 -10
- package/dist/storage/StorageUtility.js.map +0 -1
- package/dist/util/UuidGenerator.js +0 -10
- package/dist/util/UuidGenerator.js.map +0 -1
- package/dist/util/urlPath.js +0 -11
- package/dist/util/urlPath.js.map +0 -1
- package/docs/api/Makefile +0 -76
- package/docs/api/README.md +0 -46
- package/docs/api/build/docs-assets/README.md +0 -183
- package/docs/api/build/docs-assets/_static/css/inrupt.css +0 -349
- package/docs/api/build/docs-assets/_templates/breadcrumb-navigation.html +0 -10
- package/docs/api/build/docs-assets/_templates/copyright.html +0 -3
- package/docs/api/build/docs-assets/_templates/docs-sidebar.html +0 -32
- package/docs/api/build/docs-assets/_templates/docs-version-selector.html +0 -21
- package/docs/api/build/docs-assets/_templates/jira-feedback.html +0 -21
- package/docs/api/build/docs-assets/_templates/layout.html +0 -34
- package/docs/api/build/docs-assets/_templates/matomo.html +0 -18
- package/docs/api/build/docs-assets/_templates/navbar-logo.html +0 -5
- package/docs/api/build/docs-assets/_templates/navbar-nav.html +0 -44
- package/docs/api/build/docs-assets/_templates/prev-next.html +0 -19
- package/docs/api/build/docs-assets/_templates/versioned-canonical.html +0 -8
- package/docs/api/build/docs-assets/themes/inrupt/theme.conf +0 -18
- package/docs/api/build/doctrees/classes/ConfigurationError.doctree +0 -0
- package/docs/api/build/doctrees/classes/InMemoryStorage.doctree +0 -0
- package/docs/api/build/doctrees/classes/NotImplementedError.doctree +0 -0
- package/docs/api/build/doctrees/classes/Session.doctree +0 -0
- package/docs/api/build/doctrees/environment.pickle +0 -0
- package/docs/api/build/doctrees/functions.doctree +0 -0
- package/docs/api/build/doctrees/index.doctree +0 -0
- package/docs/api/build/doctrees/interfaces/ILoginInputOptions.doctree +0 -0
- package/docs/api/build/doctrees/interfaces/ISessionInfo.doctree +0 -0
- package/docs/api/build/doctrees/interfaces/ISessionOptions.doctree +0 -0
- package/docs/api/build/doctrees/interfaces/IStorage.doctree +0 -0
- package/docs/api/build/html/.buildinfo +0 -4
- package/docs/api/build/html/_static/basic.css +0 -905
- package/docs/api/build/html/_static/css/blank.css +0 -2
- package/docs/api/build/html/_static/css/index.ff1ffe594081f20da1ef19478df9384b.css +0 -6
- package/docs/api/build/html/_static/css/inrupt.css +0 -349
- package/docs/api/build/html/_static/css/theme.css +0 -120
- package/docs/api/build/html/_static/doctools.js +0 -323
- package/docs/api/build/html/_static/documentation_options.js +0 -12
- package/docs/api/build/html/_static/file.png +0 -0
- package/docs/api/build/html/_static/jquery-3.5.1.js +0 -10872
- package/docs/api/build/html/_static/jquery.js +0 -2
- package/docs/api/build/html/_static/js/index.be7d3bbb2ef33a8344ce.js +0 -32
- package/docs/api/build/html/_static/language_data.js +0 -297
- package/docs/api/build/html/_static/minus.png +0 -0
- package/docs/api/build/html/_static/plus.png +0 -0
- package/docs/api/build/html/_static/pygments.css +0 -74
- package/docs/api/build/html/_static/searchtools.js +0 -529
- package/docs/api/build/html/_static/underscore-1.13.1.js +0 -2042
- package/docs/api/build/html/_static/underscore.js +0 -6
- package/docs/api/build/html/_static/vendor/fontawesome/5.13.0/LICENSE.txt +0 -34
- package/docs/api/build/html/_static/vendor/fontawesome/5.13.0/css/all.min.css +0 -5
- package/docs/api/build/html/_static/vendor/fontawesome/5.13.0/webfonts/fa-brands-400.eot +0 -0
- package/docs/api/build/html/_static/vendor/fontawesome/5.13.0/webfonts/fa-brands-400.svg +0 -3570
- package/docs/api/build/html/_static/vendor/fontawesome/5.13.0/webfonts/fa-brands-400.ttf +0 -0
- package/docs/api/build/html/_static/vendor/fontawesome/5.13.0/webfonts/fa-brands-400.woff +0 -0
- package/docs/api/build/html/_static/vendor/fontawesome/5.13.0/webfonts/fa-brands-400.woff2 +0 -0
- package/docs/api/build/html/_static/vendor/fontawesome/5.13.0/webfonts/fa-regular-400.eot +0 -0
- package/docs/api/build/html/_static/vendor/fontawesome/5.13.0/webfonts/fa-regular-400.svg +0 -803
- package/docs/api/build/html/_static/vendor/fontawesome/5.13.0/webfonts/fa-regular-400.ttf +0 -0
- package/docs/api/build/html/_static/vendor/fontawesome/5.13.0/webfonts/fa-regular-400.woff +0 -0
- package/docs/api/build/html/_static/vendor/fontawesome/5.13.0/webfonts/fa-regular-400.woff2 +0 -0
- package/docs/api/build/html/_static/vendor/fontawesome/5.13.0/webfonts/fa-solid-900.eot +0 -0
- package/docs/api/build/html/_static/vendor/fontawesome/5.13.0/webfonts/fa-solid-900.svg +0 -4938
- package/docs/api/build/html/_static/vendor/fontawesome/5.13.0/webfonts/fa-solid-900.ttf +0 -0
- package/docs/api/build/html/_static/vendor/fontawesome/5.13.0/webfonts/fa-solid-900.woff +0 -0
- package/docs/api/build/html/_static/vendor/fontawesome/5.13.0/webfonts/fa-solid-900.woff2 +0 -0
- package/docs/api/build/html/_static/webpack-macros.html +0 -25
- package/docs/api/build/html/classes/ConfigurationError.html +0 -726
- package/docs/api/build/html/classes/InMemoryStorage.html +0 -636
- package/docs/api/build/html/classes/NotImplementedError.html +0 -726
- package/docs/api/build/html/classes/Session.html +0 -2428
- package/docs/api/build/html/functions.html +0 -834
- package/docs/api/build/html/genindex.html +0 -311
- package/docs/api/build/html/index.html +0 -342
- package/docs/api/build/html/interfaces/ILoginInputOptions.html +0 -595
- package/docs/api/build/html/interfaces/ISessionInfo.html +0 -481
- package/docs/api/build/html/interfaces/ISessionOptions.html +0 -463
- package/docs/api/build/html/interfaces/IStorage.html +0 -531
- package/docs/api/build/html/objects.inv +0 -0
- package/docs/api/build/html/search.html +0 -340
- package/docs/api/build/html/searchindex.js +0 -1
- package/docs/api/build/source/classes/ConfigurationError.md +0 -159
- package/docs/api/build/source/classes/InMemoryStorage.md +0 -112
- package/docs/api/build/source/classes/NotImplementedError.md +0 -159
- package/docs/api/build/source/classes/Session.md +0 -907
- package/docs/api/build/source/functions.md +0 -235
- package/docs/api/build/source/index.rst +0 -13
- package/docs/api/build/source/interfaces/ILoginInputOptions.md +0 -109
- package/docs/api/build/source/interfaces/ISessionInfo.md +0 -63
- package/docs/api/build/source/interfaces/ISessionOptions.md +0 -60
- package/docs/api/build/source/interfaces/IStorage.md +0 -76
- package/docs/api/conf.py +0 -135
- package/docs/api/redirects.txt +0 -41
- package/docs/api/requirements.txt +0 -5
- package/docs/api/source/api/.nojekyll +0 -1
- package/docs/api/source/api/classes/ConfigurationError.md +0 -163
- package/docs/api/source/api/classes/InMemoryStorage.md +0 -112
- package/docs/api/source/api/classes/NotImplementedError.md +0 -163
- package/docs/api/source/api/classes/Session.md +0 -1426
- package/docs/api/source/api/index.md +0 -251
- package/docs/api/source/api/interfaces/ILoginInputOptions.md +0 -109
- package/docs/api/source/api/interfaces/ISessionInfo.md +0 -63
- package/docs/api/source/api/interfaces/ISessionOptions.md +0 -60
- package/docs/api/source/api/interfaces/IStorage.md +0 -76
- package/docs/api/source/functions.md +0 -3
- package/docs/api/source/index.rst +0 -13
- package/examples/demoAuthentiationMonitor/index.js +0 -34
- package/examples/demoAuthentiationMonitor/package-lock.json +0 -916
- package/examples/demoAuthentiationMonitor/package.json +0 -15
- package/examples/demoClientApp/.babelrc +0 -3
- package/examples/demoClientApp/package-lock.json +0 -11710
- package/examples/demoClientApp/package.json +0 -37
- package/examples/demoClientApp/src/DemoClientApp.js +0 -686
- package/examples/demoClientApp/src/index.html +0 -142
- package/examples/demoClientApp/src/index.js +0 -26
- package/examples/demoClientApp/webpack.config.js +0 -39
- package/examples/single/bundle/.babelrc +0 -3
- package/examples/single/bundle/README.md +0 -11
- package/examples/single/bundle/client-app-profile.ttl +0 -10
- package/examples/single/bundle/package-lock.json +0 -11196
- package/examples/single/bundle/package.json +0 -31
- package/examples/single/bundle/src/App.js +0 -123
- package/examples/single/bundle/src/index.html +0 -10
- package/examples/single/bundle/src/index.js +0 -26
- package/examples/single/bundle/webpack.config.js +0 -33
- package/examples/single/script/README.md +0 -11
- package/examples/single/script/index.html +0 -36
- package/examples/single/script/package-lock.json +0 -1293
- package/examples/single/script/package.json +0 -20
- package/examples/single/script/server.ts +0 -18
- package/jest.config.js +0 -10
- package/licenses.csv +0 -147
- package/rollup.config.js +0 -57
- package/sampleFlows/SolidAuthClientArchitecture.png +0 -0
- package/sampleFlows/authorization-code-with-pkce.png +0 -0
- package/sampleFlows/authorization-code-with-pkce.seqdiag +0 -46
- package/sampleFlows/authorization-code.png +0 -0
- package/sampleFlows/authorization-code.seqdiag +0 -50
- package/sampleFlows/client-credentials.png +0 -0
- package/sampleFlows/client-credentials.seqdiag +0 -38
- package/sampleFlows/legacy-implicit-flow.png +0 -0
- package/sampleFlows/legacy-implicit-flow.seqdiag +0 -43
- package/sampleFlows/self-signed.png +0 -0
- package/sampleFlows/self-signed.seqdiag +0 -49
- package/sampleFlows/signatory-access-control.seqdiag +0 -36
- package/sampleFlows/signatory-access-control.svg +0 -1
- package/tsconfig.eslint.json +0 -6
- package/tsconfig.json +0 -17
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.WELL_KNOWN_OPENID_CONFIG = void 0;
|
|
4
|
-
const solid_client_authn_core_1 = require("@inrupt/solid-client-authn-core");
|
|
5
|
-
const urlPath_1 = require("../../util/urlPath");
|
|
6
|
-
exports.WELL_KNOWN_OPENID_CONFIG = ".well-known/openid-configuration";
|
|
7
|
-
const issuerConfigKeyMap = {
|
|
8
|
-
issuer: {
|
|
9
|
-
toKey: "issuer",
|
|
10
|
-
convertToUrl: true,
|
|
11
|
-
},
|
|
12
|
-
authorization_endpoint: {
|
|
13
|
-
toKey: "authorizationEndpoint",
|
|
14
|
-
convertToUrl: true,
|
|
15
|
-
},
|
|
16
|
-
token_endpoint: {
|
|
17
|
-
toKey: "tokenEndpoint",
|
|
18
|
-
convertToUrl: true,
|
|
19
|
-
},
|
|
20
|
-
userinfo_endpoint: {
|
|
21
|
-
toKey: "userinfoEndpoint",
|
|
22
|
-
convertToUrl: true,
|
|
23
|
-
},
|
|
24
|
-
jwks_uri: {
|
|
25
|
-
toKey: "jwksUri",
|
|
26
|
-
convertToUrl: true,
|
|
27
|
-
},
|
|
28
|
-
registration_endpoint: {
|
|
29
|
-
toKey: "registrationEndpoint",
|
|
30
|
-
convertToUrl: true,
|
|
31
|
-
},
|
|
32
|
-
scopes_supported: { toKey: "scopesSupported" },
|
|
33
|
-
response_types_supported: { toKey: "responseTypesSupported" },
|
|
34
|
-
response_modes_supported: { toKey: "responseModesSupported" },
|
|
35
|
-
grant_types_supported: { toKey: "grantTypesSupported" },
|
|
36
|
-
acr_values_supported: { toKey: "acrValuesSupported" },
|
|
37
|
-
subject_types_supported: { toKey: "subjectTypesSupported" },
|
|
38
|
-
id_token_signing_alg_values_supported: {
|
|
39
|
-
toKey: "idTokenSigningAlgValuesSupported",
|
|
40
|
-
},
|
|
41
|
-
id_token_encryption_alg_values_supported: {
|
|
42
|
-
toKey: "idTokenEncryptionAlgValuesSupported",
|
|
43
|
-
},
|
|
44
|
-
id_token_encryption_enc_values_supported: {
|
|
45
|
-
toKey: "idTokenEncryptionEncValuesSupported",
|
|
46
|
-
},
|
|
47
|
-
userinfo_signing_alg_values_supported: {
|
|
48
|
-
toKey: "userinfoSigningAlgValuesSupported",
|
|
49
|
-
},
|
|
50
|
-
userinfo_encryption_alg_values_supported: {
|
|
51
|
-
toKey: "userinfoEncryptionAlgValuesSupported",
|
|
52
|
-
},
|
|
53
|
-
userinfo_encryption_enc_values_supported: {
|
|
54
|
-
toKey: "userinfoEncryptionEncValuesSupported",
|
|
55
|
-
},
|
|
56
|
-
request_object_signing_alg_values_supported: {
|
|
57
|
-
toKey: "requestObjectSigningAlgValuesSupported",
|
|
58
|
-
},
|
|
59
|
-
request_object_encryption_alg_values_supported: {
|
|
60
|
-
toKey: "requestObjectEncryptionAlgValuesSupported",
|
|
61
|
-
},
|
|
62
|
-
request_object_encryption_enc_values_supported: {
|
|
63
|
-
toKey: "requestObjectEncryptionEncValuesSupported",
|
|
64
|
-
},
|
|
65
|
-
token_endpoint_auth_methods_supported: {
|
|
66
|
-
toKey: "tokenEndpointAuthMethodsSupported",
|
|
67
|
-
},
|
|
68
|
-
token_endpoint_auth_signing_alg_values_supported: {
|
|
69
|
-
toKey: "tokenEndpointAuthSigningAlgValuesSupported",
|
|
70
|
-
},
|
|
71
|
-
display_values_supported: { toKey: "displayValuesSupported" },
|
|
72
|
-
claim_types_supported: { toKey: "claimTypesSupported" },
|
|
73
|
-
claims_supported: { toKey: "claimsSupported" },
|
|
74
|
-
service_documentation: { toKey: "serviceDocumentation" },
|
|
75
|
-
claims_locales_supported: { toKey: "claimsLocalesSupported" },
|
|
76
|
-
ui_locales_supported: { toKey: "uiLocalesSupported" },
|
|
77
|
-
claims_parameter_supported: { toKey: "claimsParameterSupported" },
|
|
78
|
-
request_parameter_supported: { toKey: "requestParameterSupported" },
|
|
79
|
-
request_uri_parameter_supported: { toKey: "requestUriParameterSupported" },
|
|
80
|
-
require_request_uri_registration: { toKey: "requireRequestUriRegistration" },
|
|
81
|
-
op_policy_uri: {
|
|
82
|
-
toKey: "opPolicyUri",
|
|
83
|
-
convertToUrl: true,
|
|
84
|
-
},
|
|
85
|
-
op_tos_uri: {
|
|
86
|
-
toKey: "opTosUri",
|
|
87
|
-
convertToUrl: true,
|
|
88
|
-
},
|
|
89
|
-
};
|
|
90
|
-
function processConfig(config) {
|
|
91
|
-
const parsedConfig = {};
|
|
92
|
-
Object.keys(config).forEach((key) => {
|
|
93
|
-
if (issuerConfigKeyMap[key]) {
|
|
94
|
-
parsedConfig[issuerConfigKeyMap[key].toKey] = config[key];
|
|
95
|
-
}
|
|
96
|
-
});
|
|
97
|
-
if (!Array.isArray(parsedConfig.scopesSupported)) {
|
|
98
|
-
parsedConfig.scopesSupported = ["openid"];
|
|
99
|
-
}
|
|
100
|
-
return parsedConfig;
|
|
101
|
-
}
|
|
102
|
-
class IssuerConfigFetcher {
|
|
103
|
-
constructor(storageUtility) {
|
|
104
|
-
this.storageUtility = storageUtility;
|
|
105
|
-
}
|
|
106
|
-
static getLocalStorageKey(issuer) {
|
|
107
|
-
return `issuerConfig:${issuer}`;
|
|
108
|
-
}
|
|
109
|
-
async fetchConfig(issuer) {
|
|
110
|
-
let issuerConfig;
|
|
111
|
-
const openIdConfigUrl = (0, urlPath_1.appendToUrlPathname)(issuer, exports.WELL_KNOWN_OPENID_CONFIG);
|
|
112
|
-
const issuerConfigRequestBody = await window.fetch(openIdConfigUrl);
|
|
113
|
-
try {
|
|
114
|
-
issuerConfig = processConfig(await issuerConfigRequestBody.json());
|
|
115
|
-
}
|
|
116
|
-
catch (err) {
|
|
117
|
-
throw new solid_client_authn_core_1.ConfigurationError(`[${issuer.toString()}] has an invalid configuration: ${err.message}`);
|
|
118
|
-
}
|
|
119
|
-
await this.storageUtility.set(IssuerConfigFetcher.getLocalStorageKey(issuer), JSON.stringify(issuerConfig));
|
|
120
|
-
return issuerConfig;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
exports.default = IssuerConfigFetcher;
|
|
124
|
-
//# sourceMappingURL=IssuerConfigFetcher.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IssuerConfigFetcher.js","sourceRoot":"","sources":["../../../src/login/oidc/IssuerConfig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IACH,CAAC,CAAC,CAAC;IACH,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC,eAAe,CAAC,EAAE;QAChD,YAAY,CAAC,eAAe,GAAG,CAAC,QAAQ,CAAC,CAAC;KAC3C;IACD,OAAO,YAAwC,CAAC;AAClD,CAAC;AAKD,MAAqB,mBAAmB;IACtC,YAAoB,cAA+B;QAA/B,mBAAc,GAAd,cAAc,CAAiB;IAAG,CAAC;IAIhD,MAAM,CAAC,kBAAkB,CAAC,MAAc;QAC7C,OAAO,gBAAgB,MAAM,EAAE,CAAC;IAClC,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,MAAc;QAC9B,IAAI,YAA2B,CAAC;QAEhC,MAAM,eAAe,GAAG,IAAA,6BAAmB,EACzC,MAAM,EACN,gCAAwB,CACzB,CAAC;QACF,MAAM,uBAAuB,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;QAEpE,IAAI;YACF,YAAY,GAAG,aAAa,CAAC,MAAM,uBAAuB,CAAC,IAAI,EAAE,CAAC,CAAC;SACpE;QAAC,OAAO,GAAG,EAAE;YACZ,MAAM,IAAI,4CAAkB,CAC1B,IAAI,MAAM,CAAC,QAAQ,EAAE,mCAClB,GAA2B,CAAC,OAC/B,EAAE,CACH,CAAC;SACH;QAGD,MAAM,IAAI,CAAC,cAAc,CAAC,GAAG,CAC3B,mBAAmB,CAAC,kBAAkB,CAAC,MAAM,CAAC,EAC9C,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,CAC7B,CAAC;QAEF,OAAO,YAAY,CAAC;IACtB,CAAC;CACF;AApCD,sCAoCC"}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const solid_client_authn_core_1 = require("@inrupt/solid-client-authn-core");
|
|
4
|
-
function hasIssuer(options) {
|
|
5
|
-
return typeof options.oidcIssuer === "string";
|
|
6
|
-
}
|
|
7
|
-
function hasRedirectUrl(options) {
|
|
8
|
-
return typeof options.redirectUrl === "string";
|
|
9
|
-
}
|
|
10
|
-
class OidcLoginHandler {
|
|
11
|
-
constructor(storageUtility, oidcHandler, issuerConfigFetcher, clientRegistrar) {
|
|
12
|
-
this.storageUtility = storageUtility;
|
|
13
|
-
this.oidcHandler = oidcHandler;
|
|
14
|
-
this.issuerConfigFetcher = issuerConfigFetcher;
|
|
15
|
-
this.clientRegistrar = clientRegistrar;
|
|
16
|
-
}
|
|
17
|
-
async canHandle(options) {
|
|
18
|
-
return hasIssuer(options) && hasRedirectUrl(options);
|
|
19
|
-
}
|
|
20
|
-
async handle(options) {
|
|
21
|
-
if (!hasIssuer(options)) {
|
|
22
|
-
throw new solid_client_authn_core_1.ConfigurationError(`OidcLoginHandler requires an OIDC issuer: missing property 'oidcIssuer' in ${JSON.stringify(options)}`);
|
|
23
|
-
}
|
|
24
|
-
if (!hasRedirectUrl(options)) {
|
|
25
|
-
throw new solid_client_authn_core_1.ConfigurationError(`OidcLoginHandler requires a redirect URL: missing property 'redirectUrl' in ${JSON.stringify(options)}`);
|
|
26
|
-
}
|
|
27
|
-
const issuerConfig = await this.issuerConfigFetcher.fetchConfig(options.oidcIssuer);
|
|
28
|
-
const clientRegistration = await (0, solid_client_authn_core_1.handleRegistration)(options, issuerConfig, this.storageUtility, this.clientRegistrar);
|
|
29
|
-
const OidcOptions = {
|
|
30
|
-
issuer: issuerConfig.issuer,
|
|
31
|
-
dpop: options.tokenType.toLowerCase() === "dpop",
|
|
32
|
-
...options,
|
|
33
|
-
issuerConfiguration: issuerConfig,
|
|
34
|
-
client: clientRegistration,
|
|
35
|
-
};
|
|
36
|
-
return this.oidcHandler.handle(OidcOptions);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
exports.default = OidcLoginHandler;
|
|
40
|
-
//# sourceMappingURL=OidcLoginHandler.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OidcLogin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MAAM,EAAE,YAAY,CAAC,MAAM;YAE3B,IAAI,EAAE,OAAO,CAAC,SAAS,CAAC,WAAW,EAAE,KAAK,MAAM;YAChD,GAAG,OAAO;YACV,mBAAmB,EAAE,YAAY;YACjC,MAAM,EAAE,kBAAkB;SAC3B,CAAC;QAGF,OAAO,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;IAC9C,CAAC;CACF;AAzDD,mCAyDC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const iframe_1 = require("../../iframe");
|
|
4
|
-
class Redirector {
|
|
5
|
-
redirect(redirectUrl, options) {
|
|
6
|
-
if (options && options.handleRedirect) {
|
|
7
|
-
options.handleRedirect(redirectUrl);
|
|
8
|
-
}
|
|
9
|
-
else if (options && options.redirectByReplacingState) {
|
|
10
|
-
window.history.replaceState({}, "", redirectUrl);
|
|
11
|
-
}
|
|
12
|
-
else if (options === null || options === void 0 ? void 0 : options.redirectInIframe) {
|
|
13
|
-
(0, iframe_1.redirectInIframe)(redirectUrl);
|
|
14
|
-
}
|
|
15
|
-
else {
|
|
16
|
-
window.location.href = redirectUrl;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
exports.default = Redirector;
|
|
21
|
-
//# sourceMappingURL=Redirector.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Redirector.js","sourceRoot":"","sources":["../../../src/login/oidc/Redirector.ts"],"names":[],"mappings":";;AA8BA,yCAAgD;AAKhD,MAAqB,UAAU;IAC7B,QAAQ,CAAC,WAAmB,EAAE,OAA4B;QACxD,IAAI,OAAO,IAAI,OAAO,CAAC,cAAc,EAAE;YACrC,OAAO,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;SACrC;aAAM,IAAI,OAAO,IAAI,OAAO,CAAC,wBAAwB,EAAE;YACtD,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,EAAE,EAAE,EAAE,WAAW,CAAC,CAAC;SAClD;aAAM,IAAI,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,gBAAgB,EAAE;YACpC,IAAA,yBAAgB,EAAC,WAAW,CAAC,CAAC;SAC/B;aAAM;YACL,MAAM,CAAC,QAAQ,CAAC,IAAI,GAAG,WAAW,CAAC;SACpC;IACH,CAAC;CACF;AAZD,6BAYC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.standardOidcOptions = void 0;
|
|
4
|
-
const globals_1 = require("@jest/globals");
|
|
5
|
-
exports.standardOidcOptions = {
|
|
6
|
-
sessionId: "mySession",
|
|
7
|
-
issuer: "https://example.com",
|
|
8
|
-
dpop: true,
|
|
9
|
-
redirectUrl: "https://app.example.com",
|
|
10
|
-
handleRedirect: globals_1.jest.fn((url) => url),
|
|
11
|
-
issuerConfiguration: {
|
|
12
|
-
issuer: "https://example.com",
|
|
13
|
-
authorizationEndpoint: "https://example.com/auth",
|
|
14
|
-
tokenEndpoint: "https://example.com/token",
|
|
15
|
-
jwksUri: "https://example.com/jwks",
|
|
16
|
-
subjectTypesSupported: [],
|
|
17
|
-
claimsSupported: [],
|
|
18
|
-
scopesSupported: ["openid"],
|
|
19
|
-
},
|
|
20
|
-
client: {
|
|
21
|
-
clientId: "coolApp",
|
|
22
|
-
clientType: "dynamic",
|
|
23
|
-
},
|
|
24
|
-
};
|
|
25
|
-
//# sourceMappingURL=IOidcOptions.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IOidcOptions.js","sourceRoot":"","sources":["../../../../src/login/oidc/__mocks__/IOidcOptions.ts"],"names":[],"mappings":";;;AAsBA,2CAAqC;AAExB,QAAA,mBAAmB,GAAiB;IAC/C,SAAS,EAAE,WAAW;IACtB,MAAM,EAAE,qBAAqB;IAC7B,IAAI,EAAE,IAAI;IACV,WAAW,EAAE,yBAAyB;IACtC,cAAc,EAAE,cAAI,CAAC,EAAE,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC;IAErC,mBAAmB,EAAE;QACnB,MAAM,EAAE,qBAAqB;QAC7B,qBAAqB,EAAE,0BAA0B;QACjD,aAAa,EAAE,2BAA2B;QAC1C,OAAO,EAAE,0BAA0B;QACnC,qBAAqB,EAAE,EAAE;QACzB,eAAe,EAAE,EAAE;QACnB,eAAe,EAAE,CAAC,QAAQ,CAAC;KAC5B;IACD,MAAM,EAAE;QACN,QAAQ,EAAE,SAAS;QACnB,UAAU,EAAE,SAAS;KACtB;CACF,CAAC"}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const oidc_client_ext_1 = require("@inrupt/oidc-client-ext");
|
|
4
|
-
class AuthorizationCodeWithPkceOidcHandler {
|
|
5
|
-
constructor(storageUtility, redirector) {
|
|
6
|
-
this.storageUtility = storageUtility;
|
|
7
|
-
this.redirector = redirector;
|
|
8
|
-
}
|
|
9
|
-
async canHandle(oidcLoginOptions) {
|
|
10
|
-
return !!(oidcLoginOptions.issuerConfiguration.grantTypesSupported &&
|
|
11
|
-
oidcLoginOptions.issuerConfiguration.grantTypesSupported.indexOf("authorization_code") > -1);
|
|
12
|
-
}
|
|
13
|
-
async handle(oidcLoginOptions) {
|
|
14
|
-
var _a;
|
|
15
|
-
const oidcOptions = {
|
|
16
|
-
authority: oidcLoginOptions.issuer.toString(),
|
|
17
|
-
client_id: oidcLoginOptions.client.clientId,
|
|
18
|
-
client_secret: oidcLoginOptions.client.clientSecret,
|
|
19
|
-
redirect_uri: oidcLoginOptions.redirectUrl.toString(),
|
|
20
|
-
post_logout_redirect_uri: oidcLoginOptions.redirectUrl.toString(),
|
|
21
|
-
response_type: "code",
|
|
22
|
-
scope: "openid offline_access webid",
|
|
23
|
-
filterProtocolClaims: true,
|
|
24
|
-
loadUserInfo: false,
|
|
25
|
-
code_verifier: true,
|
|
26
|
-
prompt: (_a = oidcLoginOptions.prompt) !== null && _a !== void 0 ? _a : "consent",
|
|
27
|
-
};
|
|
28
|
-
const oidcClientLibrary = new oidc_client_ext_1.OidcClient(oidcOptions);
|
|
29
|
-
const { redirector } = this;
|
|
30
|
-
const storage = this.storageUtility;
|
|
31
|
-
try {
|
|
32
|
-
const signingRequest = await oidcClientLibrary.createSigninRequest();
|
|
33
|
-
await Promise.all([
|
|
34
|
-
storage.setForUser(signingRequest.state._id, {
|
|
35
|
-
sessionId: oidcLoginOptions.sessionId,
|
|
36
|
-
}),
|
|
37
|
-
storage.setForUser(oidcLoginOptions.sessionId, {
|
|
38
|
-
codeVerifier: signingRequest.state._code_verifier,
|
|
39
|
-
issuer: oidcLoginOptions.issuer.toString(),
|
|
40
|
-
redirectUrl: oidcLoginOptions.redirectUrl,
|
|
41
|
-
dpop: oidcLoginOptions.dpop ? "true" : "false",
|
|
42
|
-
}),
|
|
43
|
-
]);
|
|
44
|
-
redirector.redirect(signingRequest.url.toString(), {
|
|
45
|
-
handleRedirect: oidcLoginOptions.handleRedirect,
|
|
46
|
-
redirectInIframe: oidcLoginOptions.inIframe,
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
catch (err) {
|
|
50
|
-
console.error(err);
|
|
51
|
-
}
|
|
52
|
-
return undefined;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
exports.default = AuthorizationCodeWithPkceOidcHandler;
|
|
56
|
-
//# sourceMappingURL=AuthorizationCodeWithPkceOidcHandler.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AuthorizationCodeWithPkceOidcHandler.js","sourceRoot":"","sources":["../../../../src/login/oidc/oidcHandlers/AuthorizationCodeWithPkceOidcHandler.ts"],"names":[],"mappings":";;AAoCA,6DAAqD;AAOrD,MAAqB,oCAAoC;IAGvD,YACU,cAA+B,E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AAC,SAAS;iBACtC,CAAC;gBAMF,OAAO,CAAC,UAAU,CAAC,gBAAgB,CAAC,SAAS,EAAE;oBAE7C,YAAY,EAAE,cAAc,CAAC,KAAK,CAAC,cAAc;oBACjD,MAAM,EAAE,gBAAgB,CAAC,MAAM,CAAC,QAAQ,EAAE;oBAE1C,WAAW,EAAE,gBAAgB,CAAC,WAAW;oBACzC,IAAI,EAAE,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO;iBAC/C,CAAC;aACH,CAAC,CAAC;YAEH,UAAU,CAAC,QAAQ,CAAC,cAAc,CAAC,GAAG,CAAC,QAAQ,EAAE,EAAE;gBACjD,cAAc,EAAE,gBAAgB,CAAC,cAAc;gBAC/C,gBAAgB,EAAE,gBAAgB,CAAC,QAAQ;aAC5C,CAAC,CAAC;SACJ;QAAC,OAAO,GAAY,EAAE;YAErB,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;SACpB;QAGD,OAAO,SAAS,CAAC;IACnB,CAAC;CACF;AAvFD,uDAuFC"}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const IOidcOptions_1 = require("../__mocks__/IOidcOptions");
|
|
4
|
-
const canHandleTests = {
|
|
5
|
-
authorizationCodeWithPkceOidcHandler: [
|
|
6
|
-
{
|
|
7
|
-
message: "should accept a configuration with many grant types including authorization code",
|
|
8
|
-
shouldPass: true,
|
|
9
|
-
oidcOptions: {
|
|
10
|
-
...IOidcOptions_1.standardOidcOptions,
|
|
11
|
-
issuerConfiguration: {
|
|
12
|
-
...IOidcOptions_1.standardOidcOptions.issuerConfiguration,
|
|
13
|
-
grantTypesSupported: ["authorization_code", "implicit", "device"],
|
|
14
|
-
},
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
message: "should accept a configuration with only the authorization code grant type",
|
|
19
|
-
shouldPass: true,
|
|
20
|
-
oidcOptions: {
|
|
21
|
-
...IOidcOptions_1.standardOidcOptions,
|
|
22
|
-
issuerConfiguration: {
|
|
23
|
-
...IOidcOptions_1.standardOidcOptions.issuerConfiguration,
|
|
24
|
-
grantTypesSupported: ["authorization_code"],
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
message: "shouldn't accept a configuration that has many grant types not including authorization code",
|
|
30
|
-
shouldPass: false,
|
|
31
|
-
oidcOptions: {
|
|
32
|
-
...IOidcOptions_1.standardOidcOptions,
|
|
33
|
-
issuerConfiguration: {
|
|
34
|
-
...IOidcOptions_1.standardOidcOptions.issuerConfiguration,
|
|
35
|
-
grantTypesSupported: ["implicit", "device"],
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
message: "shouldn't accept a configuration that does not include grant types",
|
|
41
|
-
shouldPass: false,
|
|
42
|
-
oidcOptions: IOidcOptions_1.standardOidcOptions,
|
|
43
|
-
},
|
|
44
|
-
],
|
|
45
|
-
};
|
|
46
|
-
exports.default = canHandleTests;
|
|
47
|
-
//# sourceMappingURL=OidcHandlerCanHandleTest.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OidcHandlerCanHandleTest.js","sourceRoot":"","sources":["../../../../src/login/oidc/oidcHandlers/OidcHandlerCanHandleTest.ts"],"names":[],"mappings":";;AAsBA,4DAAgE;AAEhE,MAAM,cAAc,GAMhB;IACF,oCAAoC,EAAE;QACpC;YACE,OAAO,EACL,kFAAkF;YACpF,UAAU,EAAE,IAAI;YAChB,WAAW,EAAE;gBACX,GAAG,kCAAmB;gBACtB,mBAAmB,EAAE;oBACnB,GAAG,kCAAmB,CAAC,mBAAmB;oBAC1C,mBAAmB,EAAE,CAAC,oBAAoB,EAAE,UAAU,EAAE,QAAQ,CAAC;iBAClE;aACF;SACF;QACD;YACE,OAAO,EACL,2EAA2E;YAC7E,UAAU,EAAE,IAAI;YAChB,WAAW,EAAE;gBACX,GAAG,kCAAmB;gBACtB,mBAAmB,EAAE;oBACnB,GAAG,kCAAmB,CAAC,mBAAmB;oBAC1C,mBAAmB,EAAE,CAAC,oBAAoB,CAAC;iBAC5C;aACF;SACF;QACD;YACE,OAAO,EACL,6FAA6F;YAC/F,UAAU,EAAE,KAAK;YACjB,WAAW,EAAE;gBACX,GAAG,kCAAmB;gBACtB,mBAAmB,EAAE;oBACnB,GAAG,kCAAmB,CAAC,mBAAmB;oBAC1C,mBAAmB,EAAE,CAAC,UAAU,EAAE,QAAQ,CAAC;iBAC5C;aACF;SACF;QACD;YACE,OAAO,EACL,oEAAoE;YACtE,UAAU,EAAE,KAAK;YACjB,WAAW,EAAE,kCAAmB;SACjC;KACF;CACF,CAAC;AAEF,kBAAe,cAAc,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const solid_client_authn_core_1 = require("@inrupt/solid-client-authn-core");
|
|
4
|
-
class AggregateRedirectHandler extends solid_client_authn_core_1.AggregateHandler {
|
|
5
|
-
constructor(redirectHandlers) {
|
|
6
|
-
super(redirectHandlers);
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
exports.default = AggregateRedirectHandler;
|
|
10
|
-
//# sourceMappingURL=AggregateRedirectHandler.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AggregateRedirectHandler.js","sourceRoot":"","sources":["../../../../src/login/oidc/redirectHandler/AggregateRedirectHandler.ts"],"names":[],"mappings":";;AA6BA,6EAKyC;AAKzC,MAAqB,wBACnB,SAAQ,0CAA+C;IAGvD,YAAY,gBAAoC;QAC9C,KAAK,CAAC,gBAAgB,CAAC,CAAC;IAC1B,CAAC;CACF;AAPD,2CAOC"}
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AuthCodeRedirectHandler = void 0;
|
|
4
|
-
const solid_client_authn_core_1 = require("@inrupt/solid-client-authn-core");
|
|
5
|
-
const oidc_client_ext_1 = require("@inrupt/oidc-client-ext");
|
|
6
|
-
class AuthCodeRedirectHandler {
|
|
7
|
-
constructor(storageUtility, sessionInfoManager, issuerConfigFetcher, clientRegistrar, tokerRefresher) {
|
|
8
|
-
this.storageUtility = storageUtility;
|
|
9
|
-
this.sessionInfoManager = sessionInfoManager;
|
|
10
|
-
this.issuerConfigFetcher = issuerConfigFetcher;
|
|
11
|
-
this.clientRegistrar = clientRegistrar;
|
|
12
|
-
this.tokerRefresher = tokerRefresher;
|
|
13
|
-
}
|
|
14
|
-
async canHandle(redirectUrl) {
|
|
15
|
-
try {
|
|
16
|
-
const myUrl = new URL(redirectUrl);
|
|
17
|
-
return (myUrl.searchParams.get("code") !== null &&
|
|
18
|
-
myUrl.searchParams.get("state") !== null);
|
|
19
|
-
}
|
|
20
|
-
catch (e) {
|
|
21
|
-
throw new Error(`[${redirectUrl}] is not a valid URL, and cannot be used as a redirect URL: ${e}`);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
async handle(redirectUrl, eventEmitter) {
|
|
25
|
-
if (!(await this.canHandle(redirectUrl))) {
|
|
26
|
-
throw new Error(`AuthCodeRedirectHandler cannot handle [${redirectUrl}]: it is missing one of [code, state].`);
|
|
27
|
-
}
|
|
28
|
-
const url = new URL(redirectUrl);
|
|
29
|
-
const oauthState = url.searchParams.get("state");
|
|
30
|
-
const storedSessionId = (await this.storageUtility.getForUser(oauthState, "sessionId", {
|
|
31
|
-
errorIfNull: true,
|
|
32
|
-
}));
|
|
33
|
-
const { issuerConfig, codeVerifier, redirectUrl: storedRedirectIri, dpop: isDpop, } = await (0, solid_client_authn_core_1.loadOidcContextFromStorage)(storedSessionId, this.storageUtility, this.issuerConfigFetcher);
|
|
34
|
-
if (codeVerifier === undefined) {
|
|
35
|
-
throw new Error(`The code verifier for session ${storedSessionId} is missing from storage.`);
|
|
36
|
-
}
|
|
37
|
-
if (storedRedirectIri === undefined) {
|
|
38
|
-
throw new Error(`The redirect URL for session ${storedSessionId} is missing from storage.`);
|
|
39
|
-
}
|
|
40
|
-
const client = await this.clientRegistrar.getClient({ sessionId: storedSessionId }, issuerConfig);
|
|
41
|
-
let tokens;
|
|
42
|
-
const tokenCreatedAt = Date.now();
|
|
43
|
-
if (isDpop) {
|
|
44
|
-
tokens = await (0, oidc_client_ext_1.getDpopToken)(issuerConfig, client, {
|
|
45
|
-
grantType: "authorization_code",
|
|
46
|
-
code: url.searchParams.get("code"),
|
|
47
|
-
codeVerifier,
|
|
48
|
-
redirectUrl: storedRedirectIri,
|
|
49
|
-
});
|
|
50
|
-
window.localStorage.removeItem(`oidc.${oauthState}`);
|
|
51
|
-
}
|
|
52
|
-
else {
|
|
53
|
-
tokens = await (0, oidc_client_ext_1.getBearerToken)(url.toString());
|
|
54
|
-
}
|
|
55
|
-
let refreshOptions;
|
|
56
|
-
if (tokens.refreshToken !== undefined) {
|
|
57
|
-
refreshOptions = {
|
|
58
|
-
sessionId: storedSessionId,
|
|
59
|
-
refreshToken: tokens.refreshToken,
|
|
60
|
-
tokenRefresher: this.tokerRefresher,
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
const authFetch = await (0, solid_client_authn_core_1.buildAuthenticatedFetch)(fetch, tokens.accessToken, {
|
|
64
|
-
dpopKey: tokens.dpopKey,
|
|
65
|
-
refreshOptions,
|
|
66
|
-
eventEmitter,
|
|
67
|
-
expiresIn: tokens.expiresIn,
|
|
68
|
-
});
|
|
69
|
-
await this.storageUtility.setForUser(storedSessionId, {
|
|
70
|
-
webId: tokens.webId,
|
|
71
|
-
isLoggedIn: "true",
|
|
72
|
-
}, { secure: true });
|
|
73
|
-
url.searchParams.delete("code");
|
|
74
|
-
await this.storageUtility.setForUser(storedSessionId, {
|
|
75
|
-
redirectUrl: url.toString(),
|
|
76
|
-
}, {
|
|
77
|
-
secure: false,
|
|
78
|
-
});
|
|
79
|
-
const sessionInfo = await this.sessionInfoManager.get(storedSessionId);
|
|
80
|
-
if (!sessionInfo) {
|
|
81
|
-
throw new Error(`Could not retrieve session: [${storedSessionId}].`);
|
|
82
|
-
}
|
|
83
|
-
return Object.assign(sessionInfo, {
|
|
84
|
-
fetch: authFetch,
|
|
85
|
-
expirationDate: typeof tokens.expiresIn === "number"
|
|
86
|
-
? tokenCreatedAt + tokens.expiresIn * 1000
|
|
87
|
-
: null,
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
exports.AuthCodeRedirectHandler = AuthCodeRedirectHandler;
|
|
92
|
-
//# sourceMappingURL=AuthCodeRedirectHandler.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AuthCodeRedirectHandler.js","sourceRoot":"","sources":["../../../../src/login/oidc/redirectHandler/AuthCodeRedirectHandler.ts"],"names":[],"mappings":";;;AA0BA,6EAYyC;AACzC,6DAIiC;AAMjC,MAAa,uBAAuB;IAClC,YACU,cAA+B,EAC/B,kBAAuC,EACvC,mBAAyC,EACzC,eAAiC,EACjC,cAA+B;QAJ/B,mBAAc,GAAd,cAAc,CAAiB;QAC/B,uBAAkB,GAAlB,kBAAkB,CAAqB;QACvC,wBAAmB,GAAnB,mBAAmB,CAAsB;QACzC,oBAAe,GAAf,eAAe,CAAkB;QACjC,mBAAc,GAAd,cAAc,CAAiB;IACtC,CAAC;IAEJ,KAAK,CAAC,SAAS,CAAC,WAAmB;QACjC,IAAI;YACF,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,WAAW,CAAC,CAAC;YACnC,OAAO,CACL,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,IAAI;gBACvC,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,IAAI,CACzC,CAAC;SACH;QAAC,OAAO,CAAC,EAAE;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AAC;QACvE,IAAI,CAAC,WAAW,EAAE;YAChB,MAAM,IAAI,KAAK,CAAC,gCAAgC,eAAe,IAAI,CAAC,CAAC;SACtE;QAED,OAAO,MAAM,CAAC,MAAM,CAAC,WAAW,EAAE;YAChC,KAAK,EAAE,SAAS;YAChB,cAAc,EACZ,OAAO,MAAM,CAAC,SAAS,KAAK,QAAQ;gBAClC,CAAC,CAAC,cAAc,GAAG,MAAM,CAAC,SAAS,GAAG,IAAI;gBAC1C,CAAC,CAAC,IAAI;SACX,CAAC,CAAC;IACL,CAAC;CACF;AAhJD,0DAgJC"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ErrorOidcHandler = void 0;
|
|
4
|
-
const solid_client_authn_core_1 = require("@inrupt/solid-client-authn-core");
|
|
5
|
-
const SessionInfoManager_1 = require("../../../sessionInfo/SessionInfoManager");
|
|
6
|
-
class ErrorOidcHandler {
|
|
7
|
-
async canHandle(redirectUrl) {
|
|
8
|
-
try {
|
|
9
|
-
return new URL(redirectUrl).searchParams.has("error");
|
|
10
|
-
}
|
|
11
|
-
catch (e) {
|
|
12
|
-
throw new Error(`[${redirectUrl}] is not a valid URL, and cannot be used as a redirect URL: ${e}`);
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
async handle(redirectUrl, eventEmitter) {
|
|
16
|
-
if (eventEmitter !== undefined) {
|
|
17
|
-
const url = new URL(redirectUrl);
|
|
18
|
-
const errorUrl = url.searchParams.get("error");
|
|
19
|
-
const errorDescriptionUrl = url.searchParams.get("error_description");
|
|
20
|
-
eventEmitter.emit(solid_client_authn_core_1.EVENTS.ERROR, errorUrl, errorDescriptionUrl);
|
|
21
|
-
}
|
|
22
|
-
return (0, SessionInfoManager_1.getUnauthenticatedSession)();
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
exports.ErrorOidcHandler = ErrorOidcHandler;
|
|
26
|
-
//# sourceMappingURL=ErrorOidcHandler.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorOidcHandler.js","sourceRoot":"","sources":["../../../../src/login/oidc/redirectHandler/ErrorOidcHandler.ts"],"names":[],"mappings":";;;AA0BA,6EAIyC;AAGzC,gFAAoF;AAQpF,MAAa,gBAAgB;IAC3B,KAAK,CAAC,SAAS,CAAC,WAAmB;QACjC,IAAI;YAEF,OAAO,IAAI,GAAG,CAAC,WAAW,CAAC,CAAC,YAAY,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;SACvD;QAAC,OAAO,CAAC,EAAE;YACV,MAAM,IAAI,KAAK,CACb,IAAI,WAAW,+DAA+D,CAAC,EAAE,CAClF,CAAC;SACH;IACH,CAAC;IAED,KAAK,CAAC,MAAM,CACV,WAAmB,EACnB,YAA2B;QAE3B,IAAI,YAAY,KAAK,SAAS,EAAE;YAC9B,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,WAAW,CAAC,CAAC;YACjC,MAAM,QAAQ,GAAG,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;YAC/C,MAAM,mBAAmB,GAAG,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;YACtE,YAAY,CAAC,IAAI,CAAC,gCAAM,CAAC,KAAK,EAAE,QAAQ,EAAE,mBAAmB,CAAC,CAAC;SAChE;QACD,OAAO,IAAA,8CAAyB,GAAE,CAAC;IACrC,CAAC;CACF;AAxBD,4CAwBC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FallbackRedirectHandler = void 0;
|
|
4
|
-
const SessionInfoManager_1 = require("../../../sessionInfo/SessionInfoManager");
|
|
5
|
-
class FallbackRedirectHandler {
|
|
6
|
-
async canHandle(redirectUrl) {
|
|
7
|
-
try {
|
|
8
|
-
new URL(redirectUrl);
|
|
9
|
-
return true;
|
|
10
|
-
}
|
|
11
|
-
catch (e) {
|
|
12
|
-
throw new Error(`[${redirectUrl}] is not a valid URL, and cannot be used as a redirect URL: ${e}`);
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
async handle(_redirectUrl) {
|
|
16
|
-
return (0, SessionInfoManager_1.getUnauthenticatedSession)();
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
exports.FallbackRedirectHandler = FallbackRedirectHandler;
|
|
20
|
-
//# sourceMappingURL=FallbackRedirectHandler.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FallbackRedirectHandler.js","sourceRoot":"","sources":["../../../../src/login/oidc/redirectHandler/FallbackRedirectHandler.ts"],"names":[],"mappings":";;;AA+BA,gFAAoF;AAQpF,MAAa,uBAAuB;IAClC,KAAK,CAAC,SAAS,CAAC,WAAmB;QACjC,IAAI;YAGF,IAAI,GAAG,CAAC,WAAW,CAAC,CAAC;YACrB,OAAO,IAAI,CAAC;SACb;QAAC,OAAO,CAAC,EAAE;YACV,MAAM,IAAI,KAAK,CACb,IAAI,WAAW,+DAA+D,CAAC,EAAE,CAClF,CAAC;SACH;IACH,CAAC;IAED,KAAK,CAAC,MAAM,CAEV,YAAoB;QAEpB,OAAO,IAAA,8CAAyB,GAAE,CAAC;IACrC,CAAC;CACF;AApBD,0DAoBC"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const solid_client_authn_core_1 = require("@inrupt/solid-client-authn-core");
|
|
4
|
-
const oidc_client_ext_1 = require("@inrupt/oidc-client-ext");
|
|
5
|
-
class TokenRefresher {
|
|
6
|
-
constructor(storageUtility, issuerConfigFetcher, clientRegistrar) {
|
|
7
|
-
this.storageUtility = storageUtility;
|
|
8
|
-
this.issuerConfigFetcher = issuerConfigFetcher;
|
|
9
|
-
this.clientRegistrar = clientRegistrar;
|
|
10
|
-
}
|
|
11
|
-
async refresh(sessionId, refreshToken, dpopKey, eventEmitter) {
|
|
12
|
-
const oidcContext = await (0, solid_client_authn_core_1.loadOidcContextFromStorage)(sessionId, this.storageUtility, this.issuerConfigFetcher);
|
|
13
|
-
const clientInfo = await this.clientRegistrar.getClient({ sessionId }, oidcContext.issuerConfig);
|
|
14
|
-
if (refreshToken === undefined) {
|
|
15
|
-
throw new Error(`Session [${sessionId}] has no refresh token to allow it to refresh its access token.`);
|
|
16
|
-
}
|
|
17
|
-
if (oidcContext.dpop && dpopKey === undefined) {
|
|
18
|
-
throw new Error(`For session [${sessionId}], the key bound to the DPoP access token must be provided to refresh said access token.`);
|
|
19
|
-
}
|
|
20
|
-
const tokenSet = await (0, oidc_client_ext_1.refresh)(refreshToken, oidcContext.issuerConfig, clientInfo, dpopKey);
|
|
21
|
-
if (tokenSet.refreshToken !== undefined) {
|
|
22
|
-
eventEmitter === null || eventEmitter === void 0 ? void 0 : eventEmitter.emit(solid_client_authn_core_1.EVENTS.NEW_REFRESH_TOKEN, tokenSet.refreshToken);
|
|
23
|
-
await this.storageUtility.setForUser(sessionId, {
|
|
24
|
-
refreshToken: tokenSet.refreshToken,
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
return tokenSet;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
exports.default = TokenRefresher;
|
|
31
|
-
//# sourceMappingURL=TokenRefresher.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TokenRefresher.js","sourceRoot":"","sources":["../../../../src/login/oidc/refresh/TokenRefresher.ts"],"names":[],"mappings":";;AA0BA,6EAUyC;AACzC,6DAAkD;AAUlD,MAAqB,cAAc;IACjC,YACU,cAA+B,EAC/B,mBAAyC,EACzC,eAAiC;QAFjC,mBAAc,GAAd,cAAc,CAAiB;QAC/B,wBAAmB,GAAnB,mBAAmB,CAAsB;QACzC,oBAAe,GAAf,eAAe,CAAkB;IACxC,CAAC;IAEJ,KAAK,CAAC,OAAO,CACX,SAAiB,EACjB,YAAqB,EACrB,OAAiB,EACjB,YAA2B;QAE3B,MAAM,WAAW,GAAG,MAAM,IAAA,oDAA0B,EAClD,SAAS,EACT,IAAI,CAAC,cAAc,EACnB,IAAI,CAAC,mBAAmB,CACzB,CAAC;QAEF,MAAM,UAAU,GAAY,MAAM,IAAI,CAAC,eAAe,CAAC,SAAS,CAC9D,EAAE,SAAS,EAAE,EACb,WAAW,CAAC,YAAY,CACzB,CAAC;QAEF,IAAI,YAAY,KAAK,SAAS,EAAE;YAE9B,MAAM,IAAI,KAAK,CACb,YAAY,SAAS,iEAAiE,CACvF,CAAC;SACH;QAED,IAAI,WAAW,CAAC,IAAI,IAAI,OAAO,KAAK,SAAS,EAAE;YAC7C,MAAM,IAAI,KAAK,CACb,gBAAgB,SAAS,0FAA0F,CACpH,CAAC;SACH;QAED,MAAM,QAAQ,GAAG,MAAM,IAAA,yBAAO,EAC5B,YAAY,EACZ,WAAW,CAAC,YAAY,EACxB,UAAU,EACV,OAAO,CACR,CAAC;QAEF,IAAI,QAAQ,CAAC,YAAY,KAAK,SAAS,EAAE;YACvC,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,IAAI,CAAC,gCAAM,CAAC,iBAAiB,EAAE,QAAQ,CAAC,YAAY,CAAC,CAAC;YACpE,MAAM,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,SAAS,EAAE;gBAC9C,YAAY,EAAE,QAAQ,CAAC,YAAY;aACpC,CAAC,CAAC;SACJ;QACD,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF;AApDD,iCAoDC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
class WebIdLoginHandler {
|
|
4
|
-
async canHandle(_loginOptions) {
|
|
5
|
-
return false;
|
|
6
|
-
}
|
|
7
|
-
async handle(_loginOptions) {
|
|
8
|
-
throw new Error("Not implemented");
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
exports.default = WebIdLoginHandler;
|
|
12
|
-
//# sourceMappingURL=WebIdLoginHandler.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"WebIdLoginHandler.js","sourceRoot":"","sources":["../../../src/login/webid/WebIdLoginHandler.ts"],"names":[],"mappings":";;AAsCA,MAAqB,iBAAiB;IACpC,KAAK,CAAC,SAAS,CAAC,aAA4B;QAC1C,OAAO,KAAK,CAAC;IACf,CAAC;IASD,KAAK,CAAC,MAAM,CAAC,aAA4B;QAEvC,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACrC,CAAC;CACF;AAhBD,oCAgBC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
class GeneralLogoutHandler {
|
|
4
|
-
constructor(sessionInfoManager) {
|
|
5
|
-
this.sessionInfoManager = sessionInfoManager;
|
|
6
|
-
}
|
|
7
|
-
async canHandle() {
|
|
8
|
-
return true;
|
|
9
|
-
}
|
|
10
|
-
async handle(userId) {
|
|
11
|
-
await this.sessionInfoManager.clear(userId);
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
exports.default = GeneralLogoutHandler;
|
|
15
|
-
//# sourceMappingURL=GeneralLogoutHandler.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"GeneralLogoutHandler.js","sourceRoot":"","sources":["../../src/logout/GeneralLogoutHandler.ts"],"names":[],"mappings":";;AAkCA,MAAqB,oBAAoB;IACvC,YAAoB,kBAAuC;QAAvC,uBAAkB,GAAlB,kBAAkB,CAAqB;IAAG,CAAC;IAE/D,KAAK,CAAC,SAAS;QACb,OAAO,IAAI,CAAC;IACd,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,MAAc;QACzB,MAAM,IAAI,CAAC,kBAAkB,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAC9C,CAAC;CACF;AAVD,uCAUC"}
|