@inrupt/solid-client-authn-browser 1.11.9-alpha.1 → 1.11.9-alpha.4

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.
Files changed (262) hide show
  1. package/dist/index.es.js +4 -352
  2. package/dist/index.es.js.map +1 -0
  3. package/dist/index.js +12 -360
  4. package/dist/index.js.map +1 -1
  5. package/dist/solid-client-authn.bundle.js +14 -363
  6. package/dist/solid-client-authn.bundle.js.map +1 -0
  7. package/package.json +8 -5
  8. package/.eslintrc.js +0 -16
  9. package/NOTICE +0 -5
  10. package/coverage/clover.xml +0 -547
  11. package/coverage/coverage-final.json +0 -28
  12. package/coverage/lcov-report/base.css +0 -224
  13. package/coverage/lcov-report/block-navigation.js +0 -87
  14. package/coverage/lcov-report/favicon.png +0 -0
  15. package/coverage/lcov-report/index.html +0 -266
  16. package/coverage/lcov-report/prettify.css +0 -1
  17. package/coverage/lcov-report/prettify.js +0 -2
  18. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  19. package/coverage/lcov-report/sorter.js +0 -196
  20. package/coverage/lcov-report/src/ClientAuthentication.ts.html +0 -631
  21. package/coverage/lcov-report/src/Session.ts.html +0 -1435
  22. package/coverage/lcov-report/src/constant.ts.html +0 -163
  23. package/coverage/lcov-report/src/defaultSession.ts.html +0 -460
  24. package/coverage/lcov-report/src/dependencies.ts.html +0 -400
  25. package/coverage/lcov-report/src/iframe.ts.html +0 -394
  26. package/coverage/lcov-report/src/index.browser.ts.html +0 -157
  27. package/coverage/lcov-report/src/index.html +0 -206
  28. package/coverage/lcov-report/src/login/AggregateLoginHandler.ts.html +0 -226
  29. package/coverage/lcov-report/src/login/index.html +0 -116
  30. package/coverage/lcov-report/src/login/oidc/AggregateOidcHandler.ts.html +0 -226
  31. package/coverage/lcov-report/src/login/oidc/ClientRegistrar.ts.html +0 -415
  32. package/coverage/lcov-report/src/login/oidc/IssuerConfigFetcher.ts.html +0 -646
  33. package/coverage/lcov-report/src/login/oidc/OidcLoginHandler.ts.html +0 -436
  34. package/coverage/lcov-report/src/login/oidc/Redirector.ts.html +0 -229
  35. package/coverage/lcov-report/src/login/oidc/index.html +0 -176
  36. package/coverage/lcov-report/src/login/oidc/oidcHandlers/AuthorizationCodeWithPkceOidcHandler.ts.html +0 -478
  37. package/coverage/lcov-report/src/login/oidc/oidcHandlers/OidcHandlerCanHandleTest.ts.html +0 -319
  38. package/coverage/lcov-report/src/login/oidc/oidcHandlers/index.html +0 -131
  39. package/coverage/lcov-report/src/login/oidc/redirectHandler/AggregateRedirectHandler.ts.html +0 -226
  40. package/coverage/lcov-report/src/login/oidc/redirectHandler/AuthCodeRedirectHandler.ts.html +0 -667
  41. package/coverage/lcov-report/src/login/oidc/redirectHandler/ErrorOidcHandler.ts.html +0 -283
  42. package/coverage/lcov-report/src/login/oidc/redirectHandler/FallbackRedirectHandler.ts.html +0 -265
  43. package/coverage/lcov-report/src/login/oidc/redirectHandler/index.html +0 -161
  44. package/coverage/lcov-report/src/login/oidc/refresh/TokenRefresher.ts.html +0 -385
  45. package/coverage/lcov-report/src/login/oidc/refresh/index.html +0 -116
  46. package/coverage/lcov-report/src/login/webid/WebIdLoginHandler.ts.html +0 -250
  47. package/coverage/lcov-report/src/login/webid/index.html +0 -116
  48. package/coverage/lcov-report/src/logout/GeneralLogoutHandler.ts.html +0 -220
  49. package/coverage/lcov-report/src/logout/index.html +0 -116
  50. package/coverage/lcov-report/src/sessionInfo/SessionInfoManager.ts.html +0 -775
  51. package/coverage/lcov-report/src/sessionInfo/index.html +0 -116
  52. package/coverage/lcov-report/src/storage/BrowserStorage.ts.html +0 -229
  53. package/coverage/lcov-report/src/storage/StorageUtility.ts.html +0 -214
  54. package/coverage/lcov-report/src/storage/index.html +0 -131
  55. package/coverage/lcov-report/src/util/UuidGenerator.ts.html +0 -226
  56. package/coverage/lcov-report/src/util/index.html +0 -131
  57. package/coverage/lcov-report/src/util/urlPath.ts.html +0 -208
  58. package/coverage/lcov.info +0 -1001
  59. package/dist/ClientAuthentication.js +0 -64
  60. package/dist/ClientAuthentication.js.map +0 -1
  61. package/dist/Session.js +0 -165
  62. package/dist/Session.js.map +0 -1
  63. package/dist/constant.js +0 -7
  64. package/dist/constant.js.map +0 -1
  65. package/dist/defaultSession.js +0 -48
  66. package/dist/defaultSession.js.map +0 -1
  67. package/dist/dependencies.js +0 -41
  68. package/dist/dependencies.js.map +0 -1
  69. package/dist/iframe.js +0 -43
  70. package/dist/iframe.js.map +0 -1
  71. package/dist/index.browser.d.ts +0 -1
  72. package/dist/index.browser.js +0 -28
  73. package/dist/index.browser.js.map +0 -1
  74. package/dist/login/AggregateLoginHandler.js +0 -10
  75. package/dist/login/AggregateLoginHandler.js.map +0 -1
  76. package/dist/login/oidc/AggregateOidcHandler.js +0 -10
  77. package/dist/login/oidc/AggregateOidcHandler.js.map +0 -1
  78. package/dist/login/oidc/ClientRegistrar.js +0 -51
  79. package/dist/login/oidc/ClientRegistrar.js.map +0 -1
  80. package/dist/login/oidc/IssuerConfigFetcher.js +0 -124
  81. package/dist/login/oidc/IssuerConfigFetcher.js.map +0 -1
  82. package/dist/login/oidc/OidcLoginHandler.js +0 -40
  83. package/dist/login/oidc/OidcLoginHandler.js.map +0 -1
  84. package/dist/login/oidc/Redirector.js +0 -21
  85. package/dist/login/oidc/Redirector.js.map +0 -1
  86. package/dist/login/oidc/__mocks__/IOidcOptions.d.ts +0 -2
  87. package/dist/login/oidc/__mocks__/IOidcOptions.js +0 -25
  88. package/dist/login/oidc/__mocks__/IOidcOptions.js.map +0 -1
  89. package/dist/login/oidc/oidcHandlers/AuthorizationCodeWithPkceOidcHandler.js +0 -56
  90. package/dist/login/oidc/oidcHandlers/AuthorizationCodeWithPkceOidcHandler.js.map +0 -1
  91. package/dist/login/oidc/oidcHandlers/OidcHandlerCanHandleTest.js +0 -47
  92. package/dist/login/oidc/oidcHandlers/OidcHandlerCanHandleTest.js.map +0 -1
  93. package/dist/login/oidc/redirectHandler/AggregateRedirectHandler.js +0 -10
  94. package/dist/login/oidc/redirectHandler/AggregateRedirectHandler.js.map +0 -1
  95. package/dist/login/oidc/redirectHandler/AuthCodeRedirectHandler.js +0 -92
  96. package/dist/login/oidc/redirectHandler/AuthCodeRedirectHandler.js.map +0 -1
  97. package/dist/login/oidc/redirectHandler/ErrorOidcHandler.js +0 -26
  98. package/dist/login/oidc/redirectHandler/ErrorOidcHandler.js.map +0 -1
  99. package/dist/login/oidc/redirectHandler/FallbackRedirectHandler.js +0 -20
  100. package/dist/login/oidc/redirectHandler/FallbackRedirectHandler.js.map +0 -1
  101. package/dist/login/oidc/refresh/TokenRefresher.js +0 -31
  102. package/dist/login/oidc/refresh/TokenRefresher.js.map +0 -1
  103. package/dist/login/webid/WebIdLoginHandler.js +0 -12
  104. package/dist/login/webid/WebIdLoginHandler.js.map +0 -1
  105. package/dist/logout/GeneralLogoutHandler.js +0 -15
  106. package/dist/logout/GeneralLogoutHandler.js.map +0 -1
  107. package/dist/sessionInfo/SessionInfoManager.js +0 -95
  108. package/dist/sessionInfo/SessionInfoManager.js.map +0 -1
  109. package/dist/solid-client-authn.bundle.js.LICENSE.txt +0 -17
  110. package/dist/storage/BrowserStorage.js +0 -18
  111. package/dist/storage/BrowserStorage.js.map +0 -1
  112. package/dist/storage/StorageUtility.js +0 -10
  113. package/dist/storage/StorageUtility.js.map +0 -1
  114. package/dist/util/UuidGenerator.js +0 -10
  115. package/dist/util/UuidGenerator.js.map +0 -1
  116. package/dist/util/urlPath.js +0 -11
  117. package/dist/util/urlPath.js.map +0 -1
  118. package/docs/api/Makefile +0 -76
  119. package/docs/api/README.md +0 -46
  120. package/docs/api/build/docs-assets/README.md +0 -183
  121. package/docs/api/build/docs-assets/_static/css/inrupt.css +0 -349
  122. package/docs/api/build/docs-assets/_templates/breadcrumb-navigation.html +0 -10
  123. package/docs/api/build/docs-assets/_templates/copyright.html +0 -3
  124. package/docs/api/build/docs-assets/_templates/docs-sidebar.html +0 -32
  125. package/docs/api/build/docs-assets/_templates/docs-version-selector.html +0 -21
  126. package/docs/api/build/docs-assets/_templates/jira-feedback.html +0 -21
  127. package/docs/api/build/docs-assets/_templates/layout.html +0 -34
  128. package/docs/api/build/docs-assets/_templates/matomo.html +0 -18
  129. package/docs/api/build/docs-assets/_templates/navbar-logo.html +0 -5
  130. package/docs/api/build/docs-assets/_templates/navbar-nav.html +0 -44
  131. package/docs/api/build/docs-assets/_templates/prev-next.html +0 -19
  132. package/docs/api/build/docs-assets/_templates/versioned-canonical.html +0 -8
  133. package/docs/api/build/docs-assets/themes/inrupt/theme.conf +0 -18
  134. package/docs/api/build/doctrees/classes/ConfigurationError.doctree +0 -0
  135. package/docs/api/build/doctrees/classes/InMemoryStorage.doctree +0 -0
  136. package/docs/api/build/doctrees/classes/NotImplementedError.doctree +0 -0
  137. package/docs/api/build/doctrees/classes/Session.doctree +0 -0
  138. package/docs/api/build/doctrees/environment.pickle +0 -0
  139. package/docs/api/build/doctrees/functions.doctree +0 -0
  140. package/docs/api/build/doctrees/index.doctree +0 -0
  141. package/docs/api/build/doctrees/interfaces/ILoginInputOptions.doctree +0 -0
  142. package/docs/api/build/doctrees/interfaces/ISessionInfo.doctree +0 -0
  143. package/docs/api/build/doctrees/interfaces/ISessionOptions.doctree +0 -0
  144. package/docs/api/build/doctrees/interfaces/IStorage.doctree +0 -0
  145. package/docs/api/build/html/.buildinfo +0 -4
  146. package/docs/api/build/html/_static/basic.css +0 -905
  147. package/docs/api/build/html/_static/css/blank.css +0 -2
  148. package/docs/api/build/html/_static/css/index.ff1ffe594081f20da1ef19478df9384b.css +0 -6
  149. package/docs/api/build/html/_static/css/inrupt.css +0 -349
  150. package/docs/api/build/html/_static/css/theme.css +0 -120
  151. package/docs/api/build/html/_static/doctools.js +0 -323
  152. package/docs/api/build/html/_static/documentation_options.js +0 -12
  153. package/docs/api/build/html/_static/file.png +0 -0
  154. package/docs/api/build/html/_static/jquery-3.5.1.js +0 -10872
  155. package/docs/api/build/html/_static/jquery.js +0 -2
  156. package/docs/api/build/html/_static/js/index.be7d3bbb2ef33a8344ce.js +0 -32
  157. package/docs/api/build/html/_static/language_data.js +0 -297
  158. package/docs/api/build/html/_static/minus.png +0 -0
  159. package/docs/api/build/html/_static/plus.png +0 -0
  160. package/docs/api/build/html/_static/pygments.css +0 -74
  161. package/docs/api/build/html/_static/searchtools.js +0 -529
  162. package/docs/api/build/html/_static/underscore-1.13.1.js +0 -2042
  163. package/docs/api/build/html/_static/underscore.js +0 -6
  164. package/docs/api/build/html/_static/vendor/fontawesome/5.13.0/LICENSE.txt +0 -34
  165. package/docs/api/build/html/_static/vendor/fontawesome/5.13.0/css/all.min.css +0 -5
  166. package/docs/api/build/html/_static/vendor/fontawesome/5.13.0/webfonts/fa-brands-400.eot +0 -0
  167. package/docs/api/build/html/_static/vendor/fontawesome/5.13.0/webfonts/fa-brands-400.svg +0 -3570
  168. package/docs/api/build/html/_static/vendor/fontawesome/5.13.0/webfonts/fa-brands-400.ttf +0 -0
  169. package/docs/api/build/html/_static/vendor/fontawesome/5.13.0/webfonts/fa-brands-400.woff +0 -0
  170. package/docs/api/build/html/_static/vendor/fontawesome/5.13.0/webfonts/fa-brands-400.woff2 +0 -0
  171. package/docs/api/build/html/_static/vendor/fontawesome/5.13.0/webfonts/fa-regular-400.eot +0 -0
  172. package/docs/api/build/html/_static/vendor/fontawesome/5.13.0/webfonts/fa-regular-400.svg +0 -803
  173. package/docs/api/build/html/_static/vendor/fontawesome/5.13.0/webfonts/fa-regular-400.ttf +0 -0
  174. package/docs/api/build/html/_static/vendor/fontawesome/5.13.0/webfonts/fa-regular-400.woff +0 -0
  175. package/docs/api/build/html/_static/vendor/fontawesome/5.13.0/webfonts/fa-regular-400.woff2 +0 -0
  176. package/docs/api/build/html/_static/vendor/fontawesome/5.13.0/webfonts/fa-solid-900.eot +0 -0
  177. package/docs/api/build/html/_static/vendor/fontawesome/5.13.0/webfonts/fa-solid-900.svg +0 -4938
  178. package/docs/api/build/html/_static/vendor/fontawesome/5.13.0/webfonts/fa-solid-900.ttf +0 -0
  179. package/docs/api/build/html/_static/vendor/fontawesome/5.13.0/webfonts/fa-solid-900.woff +0 -0
  180. package/docs/api/build/html/_static/vendor/fontawesome/5.13.0/webfonts/fa-solid-900.woff2 +0 -0
  181. package/docs/api/build/html/_static/webpack-macros.html +0 -25
  182. package/docs/api/build/html/classes/ConfigurationError.html +0 -726
  183. package/docs/api/build/html/classes/InMemoryStorage.html +0 -636
  184. package/docs/api/build/html/classes/NotImplementedError.html +0 -726
  185. package/docs/api/build/html/classes/Session.html +0 -2428
  186. package/docs/api/build/html/functions.html +0 -834
  187. package/docs/api/build/html/genindex.html +0 -311
  188. package/docs/api/build/html/index.html +0 -342
  189. package/docs/api/build/html/interfaces/ILoginInputOptions.html +0 -595
  190. package/docs/api/build/html/interfaces/ISessionInfo.html +0 -481
  191. package/docs/api/build/html/interfaces/ISessionOptions.html +0 -463
  192. package/docs/api/build/html/interfaces/IStorage.html +0 -531
  193. package/docs/api/build/html/objects.inv +0 -0
  194. package/docs/api/build/html/search.html +0 -340
  195. package/docs/api/build/html/searchindex.js +0 -1
  196. package/docs/api/build/source/classes/ConfigurationError.md +0 -159
  197. package/docs/api/build/source/classes/InMemoryStorage.md +0 -112
  198. package/docs/api/build/source/classes/NotImplementedError.md +0 -159
  199. package/docs/api/build/source/classes/Session.md +0 -907
  200. package/docs/api/build/source/functions.md +0 -235
  201. package/docs/api/build/source/index.rst +0 -13
  202. package/docs/api/build/source/interfaces/ILoginInputOptions.md +0 -109
  203. package/docs/api/build/source/interfaces/ISessionInfo.md +0 -63
  204. package/docs/api/build/source/interfaces/ISessionOptions.md +0 -60
  205. package/docs/api/build/source/interfaces/IStorage.md +0 -76
  206. package/docs/api/conf.py +0 -135
  207. package/docs/api/redirects.txt +0 -41
  208. package/docs/api/requirements.txt +0 -5
  209. package/docs/api/source/api/.nojekyll +0 -1
  210. package/docs/api/source/api/classes/ConfigurationError.md +0 -163
  211. package/docs/api/source/api/classes/InMemoryStorage.md +0 -112
  212. package/docs/api/source/api/classes/NotImplementedError.md +0 -163
  213. package/docs/api/source/api/classes/Session.md +0 -1426
  214. package/docs/api/source/api/index.md +0 -251
  215. package/docs/api/source/api/interfaces/ILoginInputOptions.md +0 -109
  216. package/docs/api/source/api/interfaces/ISessionInfo.md +0 -63
  217. package/docs/api/source/api/interfaces/ISessionOptions.md +0 -60
  218. package/docs/api/source/api/interfaces/IStorage.md +0 -76
  219. package/docs/api/source/functions.md +0 -3
  220. package/docs/api/source/index.rst +0 -13
  221. package/examples/demoAuthentiationMonitor/index.js +0 -34
  222. package/examples/demoAuthentiationMonitor/package-lock.json +0 -916
  223. package/examples/demoAuthentiationMonitor/package.json +0 -15
  224. package/examples/demoClientApp/.babelrc +0 -3
  225. package/examples/demoClientApp/package-lock.json +0 -11710
  226. package/examples/demoClientApp/package.json +0 -37
  227. package/examples/demoClientApp/src/DemoClientApp.js +0 -686
  228. package/examples/demoClientApp/src/index.html +0 -142
  229. package/examples/demoClientApp/src/index.js +0 -26
  230. package/examples/demoClientApp/webpack.config.js +0 -39
  231. package/examples/single/bundle/.babelrc +0 -3
  232. package/examples/single/bundle/README.md +0 -11
  233. package/examples/single/bundle/client-app-profile.ttl +0 -10
  234. package/examples/single/bundle/package-lock.json +0 -11196
  235. package/examples/single/bundle/package.json +0 -31
  236. package/examples/single/bundle/src/App.js +0 -123
  237. package/examples/single/bundle/src/index.html +0 -10
  238. package/examples/single/bundle/src/index.js +0 -26
  239. package/examples/single/bundle/webpack.config.js +0 -33
  240. package/examples/single/script/README.md +0 -11
  241. package/examples/single/script/index.html +0 -36
  242. package/examples/single/script/package-lock.json +0 -1293
  243. package/examples/single/script/package.json +0 -20
  244. package/examples/single/script/server.ts +0 -18
  245. package/jest.config.js +0 -10
  246. package/licenses.csv +0 -147
  247. package/rollup.config.js +0 -54
  248. package/sampleFlows/SolidAuthClientArchitecture.png +0 -0
  249. package/sampleFlows/authorization-code-with-pkce.png +0 -0
  250. package/sampleFlows/authorization-code-with-pkce.seqdiag +0 -46
  251. package/sampleFlows/authorization-code.png +0 -0
  252. package/sampleFlows/authorization-code.seqdiag +0 -50
  253. package/sampleFlows/client-credentials.png +0 -0
  254. package/sampleFlows/client-credentials.seqdiag +0 -38
  255. package/sampleFlows/legacy-implicit-flow.png +0 -0
  256. package/sampleFlows/legacy-implicit-flow.seqdiag +0 -43
  257. package/sampleFlows/self-signed.png +0 -0
  258. package/sampleFlows/self-signed.seqdiag +0 -49
  259. package/sampleFlows/signatory-access-control.seqdiag +0 -36
  260. package/sampleFlows/signatory-access-control.svg +0 -1
  261. package/tsconfig.eslint.json +0 -6
  262. package/tsconfig.json +0 -17
@@ -1,64 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const oidc_client_ext_1 = require("@inrupt/oidc-client-ext");
4
- const globalFetch = (request, init) => window.fetch(request, init);
5
- class ClientAuthentication {
6
- constructor(loginHandler, redirectHandler, logoutHandler, sessionInfoManager, issuerConfigFetcher) {
7
- this.loginHandler = loginHandler;
8
- this.redirectHandler = redirectHandler;
9
- this.logoutHandler = logoutHandler;
10
- this.sessionInfoManager = sessionInfoManager;
11
- this.issuerConfigFetcher = issuerConfigFetcher;
12
- this.login = async (options, eventEmitter) => {
13
- var _a, _b;
14
- await this.sessionInfoManager.clear(options.sessionId);
15
- const redirectUrl = (0, oidc_client_ext_1.removeOidcQueryParam)((_a = options.redirectUrl) !== null && _a !== void 0 ? _a : window.location.href);
16
- await this.loginHandler.handle({
17
- ...options,
18
- redirectUrl,
19
- clientName: (_b = options.clientName) !== null && _b !== void 0 ? _b : options.clientId,
20
- eventEmitter,
21
- });
22
- };
23
- this.fetch = globalFetch;
24
- this.logout = async (sessionId) => {
25
- await this.logoutHandler.handle(sessionId);
26
- this.fetch = globalFetch;
27
- };
28
- this.getSessionInfo = async (sessionId) => {
29
- return this.sessionInfoManager.get(sessionId);
30
- };
31
- this.getAllSessionInfo = async () => {
32
- return this.sessionInfoManager.getAll();
33
- };
34
- this.validateCurrentSession = async (currentSessionId) => {
35
- const sessionInfo = await this.sessionInfoManager.get(currentSessionId);
36
- if (sessionInfo === undefined ||
37
- sessionInfo.clientAppId === undefined ||
38
- sessionInfo.issuer === undefined) {
39
- return null;
40
- }
41
- return sessionInfo;
42
- };
43
- this.handleIncomingRedirect = async (url, eventEmitter) => {
44
- const redirectInfo = await this.redirectHandler.handle(url, eventEmitter);
45
- this.fetch = redirectInfo.fetch.bind(window);
46
- const cleanedUpUrl = new URL(url);
47
- cleanedUpUrl.searchParams.delete("state");
48
- cleanedUpUrl.searchParams.delete("code");
49
- cleanedUpUrl.searchParams.delete("id_token");
50
- cleanedUpUrl.searchParams.delete("access_token");
51
- cleanedUpUrl.searchParams.delete("error");
52
- cleanedUpUrl.searchParams.delete("error_description");
53
- window.history.replaceState(null, "", cleanedUpUrl.toString());
54
- return {
55
- isLoggedIn: redirectInfo.isLoggedIn,
56
- webId: redirectInfo.webId,
57
- sessionId: redirectInfo.sessionId,
58
- expirationDate: redirectInfo.expirationDate,
59
- };
60
- };
61
- }
62
- }
63
- exports.default = ClientAuthentication;
64
- //# sourceMappingURL=ClientAuthentication.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ClientAuthentication.js","sourceRoot":"","sources":["../src/ClientAuthentication.ts"],"names":[],"mappings":";;AAoCA,6DAA+D;AAM/D,MAAM,WAAW,GAAwB,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE,CACzD,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;AAK9B,MAAqB,oBAAoB;IACvC,YACU,YAA2B,EAC3B,eAAiC,EACjC,aAA6B,EAC7B,kBAAuC,EACvC,mBAAyC;QAJzC,iBAAY,GAAZ,YAAY,CAAe;QAC3B,oBAAe,GAAf,eAAe,CAAkB;QACjC,kBAAa,GAAb,aAAa,CAAgB;QAC7B,uBAAkB,GAAlB,kBAAkB,CAAqB;QACvC,wBAAmB,GAAnB,mB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AO,WAAW,CAAC;QACrB,CAAC,CAAC;QAEF,2BAAsB,GAAG,KAAK,EAC5B,GAAW,EACX,YAA0B,EACS,EAAE;YACrC,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,GAAG,EAAE,YAAY,CAAC,CAAC;YAK1E,IAAI,CAAC,KAAK,GAAG,YAAY,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YAE7C,MAAM,YAAY,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC;YAClC,YAAY,CAAC,YAAY,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;YAE1C,YAAY,CAAC,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;YAEzC,YAAY,CAAC,YAAY,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;YAC7C,YAAY,CAAC,YAAY,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;YAEjD,YAAY,CAAC,YAAY,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;YAC1C,YAAY,CAAC,YAAY,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC;YAOtD,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,EAAE,EAAE,EAAE,YAAY,CAAC,QAAQ,EAAE,CAAC,CAAC;YAE/D,OAAO;gBACL,UAAU,EAAE,YAAY,CAAC,UAAU;gBACnC,KAAK,EAAE,YAAY,CAAC,KAAK;gBACzB,SAAS,EAAE,YAAY,CAAC,SAAS;gBACjC,cAAc,EAAE,YAAY,CAAC,cAAc;aAC5C,CAAC;QACJ,CAAC,CAAC;IA3GC,CAAC;CA4GL;AAnHD,uCAmHC"}
package/dist/Session.js DELETED
@@ -1,165 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Session = exports.silentlyAuthenticate = void 0;
4
- const events_1 = require("events");
5
- const solid_client_authn_core_1 = require("@inrupt/solid-client-authn-core");
6
- const uuid_1 = require("uuid");
7
- const dependencies_1 = require("./dependencies");
8
- const constant_1 = require("./constant");
9
- const iframe_1 = require("./iframe");
10
- async function silentlyAuthenticate(sessionId, clientAuthn, options = {
11
- inIframe: false,
12
- }, session) {
13
- var _a;
14
- const storedSessionInfo = await clientAuthn.validateCurrentSession(sessionId);
15
- if (storedSessionInfo !== null) {
16
- window.localStorage.setItem(constant_1.KEY_CURRENT_URL, window.location.href);
17
- await clientAuthn.login({
18
- sessionId,
19
- prompt: "none",
20
- oidcIssuer: storedSessionInfo.issuer,
21
- redirectUrl: storedSessionInfo.redirectUrl,
22
- clientId: storedSessionInfo.clientAppId,
23
- clientSecret: storedSessionInfo.clientAppSecret,
24
- tokenType: (_a = storedSessionInfo.tokenType) !== null && _a !== void 0 ? _a : "DPoP",
25
- inIframe: options.inIframe,
26
- }, session);
27
- return true;
28
- }
29
- return false;
30
- }
31
- exports.silentlyAuthenticate = silentlyAuthenticate;
32
- function isLoggedIn(sessionInfo) {
33
- return !!(sessionInfo === null || sessionInfo === void 0 ? void 0 : sessionInfo.isLoggedIn);
34
- }
35
- class Session extends events_1.EventEmitter {
36
- constructor(sessionOptions = {}, sessionId) {
37
- super();
38
- this.tokenRequestInProgress = false;
39
- this.login = async (options) => {
40
- var _a;
41
- await this.clientAuthentication.login({
42
- sessionId: this.info.sessionId,
43
- ...options,
44
- tokenType: (_a = options.tokenType) !== null && _a !== void 0 ? _a : "DPoP",
45
- }, this);
46
- return new Promise(() => undefined);
47
- };
48
- this.fetch = async (url, init) => {
49
- return this.clientAuthentication.fetch(url, init);
50
- };
51
- this.internalLogout = async (emitSignal) => {
52
- window.localStorage.removeItem(constant_1.KEY_CURRENT_SESSION);
53
- await this.clientAuthentication.logout(this.info.sessionId);
54
- this.info.isLoggedIn = false;
55
- if (emitSignal) {
56
- this.emit(solid_client_authn_core_1.EVENTS.LOGOUT);
57
- }
58
- };
59
- this.logout = async () => this.internalLogout(true);
60
- this.handleIncomingRedirect = async (inputOptions = {}) => {
61
- var _a;
62
- if (this.info.isLoggedIn) {
63
- return this.info;
64
- }
65
- if (this.tokenRequestInProgress) {
66
- return undefined;
67
- }
68
- const options = typeof inputOptions === "string" ? { url: inputOptions } : inputOptions;
69
- const url = (_a = options.url) !== null && _a !== void 0 ? _a : window.location.href;
70
- if (window.frameElement !== null) {
71
- (0, iframe_1.postRedirectUrlToParent)(url);
72
- return undefined;
73
- }
74
- this.tokenRequestInProgress = true;
75
- const sessionInfo = await this.clientAuthentication.handleIncomingRedirect(url, this);
76
- if (isLoggedIn(sessionInfo)) {
77
- this.setSessionInfo(sessionInfo);
78
- const currentUrl = window.localStorage.getItem(constant_1.KEY_CURRENT_URL);
79
- if (currentUrl === null) {
80
- this.emit(solid_client_authn_core_1.EVENTS.LOGIN);
81
- }
82
- else {
83
- window.localStorage.removeItem(constant_1.KEY_CURRENT_URL);
84
- this.emit(solid_client_authn_core_1.EVENTS.SESSION_RESTORED, currentUrl);
85
- }
86
- }
87
- else if (options.restorePreviousSession === true) {
88
- const storedSessionId = window.localStorage.getItem(constant_1.KEY_CURRENT_SESSION);
89
- if (storedSessionId !== null) {
90
- const attemptedSilentAuthentication = await silentlyAuthenticate(storedSessionId, this.clientAuthentication, undefined, this);
91
- if (attemptedSilentAuthentication) {
92
- return new Promise(() => { });
93
- }
94
- }
95
- }
96
- this.tokenRequestInProgress = false;
97
- return sessionInfo;
98
- };
99
- if (sessionOptions.clientAuthentication) {
100
- this.clientAuthentication = sessionOptions.clientAuthentication;
101
- }
102
- else if (sessionOptions.secureStorage && sessionOptions.insecureStorage) {
103
- this.clientAuthentication = (0, dependencies_1.getClientAuthenticationWithDependencies)({
104
- secureStorage: sessionOptions.secureStorage,
105
- insecureStorage: sessionOptions.insecureStorage,
106
- });
107
- }
108
- else {
109
- this.clientAuthentication = (0, dependencies_1.getClientAuthenticationWithDependencies)({});
110
- }
111
- if (sessionOptions.sessionInfo) {
112
- this.info = {
113
- sessionId: sessionOptions.sessionInfo.sessionId,
114
- isLoggedIn: false,
115
- webId: sessionOptions.sessionInfo.webId,
116
- };
117
- }
118
- else {
119
- this.info = {
120
- sessionId: sessionId !== null && sessionId !== void 0 ? sessionId : (0, uuid_1.v4)(),
121
- isLoggedIn: false,
122
- };
123
- }
124
- (0, iframe_1.setupIframeListener)(async (redirectUrl) => {
125
- const sessionInfo = await this.clientAuthentication.handleIncomingRedirect(redirectUrl, this);
126
- if (!isLoggedIn(sessionInfo)) {
127
- return;
128
- }
129
- this.setSessionInfo(sessionInfo);
130
- });
131
- this.on("tokenRenewal", () => silentlyAuthenticate(this.info.sessionId, this.clientAuthentication, {
132
- inIframe: true,
133
- }, this));
134
- this.on(solid_client_authn_core_1.EVENTS.LOGIN, () => window.localStorage.setItem(constant_1.KEY_CURRENT_SESSION, this.info.sessionId));
135
- this.on(solid_client_authn_core_1.EVENTS.SESSION_EXPIRED, () => this.internalLogout(false));
136
- this.on(solid_client_authn_core_1.EVENTS.ERROR, () => this.internalLogout(false));
137
- window.localStorage.removeItem("tmp-resource-server-session-enabled");
138
- }
139
- onLogin(callback) {
140
- this.on(solid_client_authn_core_1.EVENTS.LOGIN, callback);
141
- }
142
- onLogout(callback) {
143
- this.on(solid_client_authn_core_1.EVENTS.LOGOUT, callback);
144
- }
145
- onError(callback) {
146
- this.on(solid_client_authn_core_1.EVENTS.ERROR, callback);
147
- }
148
- onSessionRestore(callback) {
149
- this.on(solid_client_authn_core_1.EVENTS.SESSION_RESTORED, callback);
150
- }
151
- onSessionExpiration(callback) {
152
- this.on(solid_client_authn_core_1.EVENTS.SESSION_EXPIRED, callback);
153
- }
154
- setSessionInfo(sessionInfo) {
155
- this.info.isLoggedIn = sessionInfo.isLoggedIn;
156
- this.info.webId = sessionInfo.webId;
157
- this.info.sessionId = sessionInfo.sessionId;
158
- this.info.expirationDate = sessionInfo.expirationDate;
159
- this.on(solid_client_authn_core_1.EVENTS.SESSION_EXTENDED, (expiresIn) => {
160
- this.info.expirationDate = Date.now() + expiresIn * 1000;
161
- });
162
- }
163
- }
164
- exports.Session = Session;
165
- //# sourceMappingURL=Session.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Session.js","sourceRoot":"","sources":["../src/Session.ts"],"names":[],"mappings":";;;AAwBA,mCAAsC;AACtC,6EAKyC;AACzC,+BAA0B;AAE1B,iDAAyE;AACzE,yCAAkE;AAClE,qCAAwE;AA8DjE,KAAK,UAAU,oBAAoB,CACxC,SAAiB,EACjB,WAAiC,EACjC,UAEI;IACF,QAAQ,EAAE,KAAK;CAChB,EACD,OAAgB;;IAEhB,MAAM,iBAAiB,GAAG,MAAM,WAAW,CAAC,sBAAsB,CAAC,SAAS,CAAC,CAAC;IAC9E,IAAI,iBAAiB,KAAK,IAAI,EAAE;QAK9B,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,0BAAe,EAAE,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QACnE,MAAM,WAAW,CAAC,KAAK,CACrB;YACE,SAAS;YACT,MAAM,EAAE,MAAM;YACd,UAAU,EAAE,iBAAiB,CAAC,MAAM;YACpC,WAAW,EAAE,iBAAiB,CAAC,WAAW;YAC1C,QAAQ,EAAE,iBAAiB,CAAC,WAAW;YACvC,YAAY,EAAE,iBAAiB,CAAC,eAAe;YAC/C,SAAS,EAAE,MAAA,iBAAiB,CAAC,SAAS,mCAAI,MAAM;YAChD,QAAQ,EAAE,OAAO,CAAC,QAAQ;SAC3B,EACD,OAAO,CACR,CAAC;QACF,OAAO,IAAI,CAAC;KACb;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAjCD,oDAiCC;AAED,SAAS,UAAU,CACjB,WAA0B;IAE1B,OAAO,CAAC,CAAC,CAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,UAAU,CAAA,CAAC;AACnC,CAAC;AAKD,MAAa,OAAQ,SAAQ,qBAAY;IAyBvC,YACE,iBAA2C,EAAE,EAC7C,SAAkB;QAElB,KAAK,EAAE,CAAC;QArBF,2BAAsB,GAAG,KAAK,CA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c,CACpB,WAAgD;QAEhD,IAAI,CAAC,IAAI,CAAC,UAAU,GAAG,WAAW,CAAC,UAAU,CAAC;QAC9C,IAAI,CAAC,IAAI,CAAC,KAAK,GAAG,WAAW,CAAC,KAAK,CAAC;QACpC,IAAI,CAAC,IAAI,CAAC,SAAS,GAAG,WAAW,CAAC,SAAS,CAAC;QAC5C,IAAI,CAAC,IAAI,CAAC,cAAc,GAAG,WAAW,CAAC,cAAc,CAAC;QACtD,IAAI,CAAC,EAAE,CAAC,gCAAM,CAAC,gBAAgB,EAAE,CAAC,SAAiB,EAAE,EAAE;YACrD,IAAI,CAAC,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,GAAG,IAAI,CAAC;QAC3D,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AApTD,0BAoTC"}
package/dist/constant.js DELETED
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.KEY_CURRENT_URL = exports.KEY_CURRENT_SESSION = void 0;
4
- const solid_client_authn_core_1 = require("@inrupt/solid-client-authn-core");
5
- exports.KEY_CURRENT_SESSION = `${solid_client_authn_core_1.SOLID_CLIENT_AUTHN_KEY_PREFIX}currentSession`;
6
- exports.KEY_CURRENT_URL = `${solid_client_authn_core_1.SOLID_CLIENT_AUTHN_KEY_PREFIX}currentUrl`;
7
- //# sourceMappingURL=constant.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constant.js","sourceRoot":"","sources":["../src/constant.ts"],"names":[],"mappings":";;;AAqBA,6EAAgF;AAEnE,QAAA,mBAAmB,GAAG,GAAG,uDAA6B,gBAAgB,CAAC;AAEvE,QAAA,eAAe,GAAG,GAAG,uDAA6B,YAAY,CAAC"}
@@ -1,48 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.onSessionRestore = exports.onLogout = exports.onLogin = exports.handleIncomingRedirect = exports.logout = exports.login = exports.fetch = exports.getDefaultSession = void 0;
4
- const Session_1 = require("./Session");
5
- let defaultSession;
6
- function getDefaultSession() {
7
- if (typeof defaultSession === "undefined") {
8
- defaultSession = new Session_1.Session();
9
- }
10
- return defaultSession;
11
- }
12
- exports.getDefaultSession = getDefaultSession;
13
- const fetch = (...args) => {
14
- const session = getDefaultSession();
15
- return session.fetch(...args);
16
- };
17
- exports.fetch = fetch;
18
- const login = (...args) => {
19
- const session = getDefaultSession();
20
- return session.login(...args);
21
- };
22
- exports.login = login;
23
- const logout = (...args) => {
24
- const session = getDefaultSession();
25
- return session.logout(...args);
26
- };
27
- exports.logout = logout;
28
- const handleIncomingRedirect = (...args) => {
29
- const session = getDefaultSession();
30
- return session.handleIncomingRedirect(...args);
31
- };
32
- exports.handleIncomingRedirect = handleIncomingRedirect;
33
- const onLogin = (...args) => {
34
- const session = getDefaultSession();
35
- return session.onLogin(...args);
36
- };
37
- exports.onLogin = onLogin;
38
- const onLogout = (...args) => {
39
- const session = getDefaultSession();
40
- return session.onLogout(...args);
41
- };
42
- exports.onLogout = onLogout;
43
- const onSessionRestore = (...args) => {
44
- const session = getDefaultSession();
45
- return session.onSessionRestore(...args);
46
- };
47
- exports.onSessionRestore = onSessionRestore;
48
- //# sourceMappingURL=defaultSession.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"defaultSession.js","sourceRoot":"","sources":["../src/defaultSession.ts"],"names":[],"mappings":";;;AAqBA,uCAAoC;AAEpC,IAAI,cAAuB,CAAC;AAY5B,SAAgB,iBAAiB;IAC/B,IAAI,OAAO,cAAc,KAAK,WAAW,EAAE;QACzC,cAAc,GAAG,IAAI,iBAAO,EAAE,CAAC;KAChC;IACD,OAAO,cAAc,CAAC;AACxB,CAAC;AALD,8CAKC;AAUM,MAAM,KAAK,GAAqB,CAAC,GAAG,IAAI,EAAE,EAAE;IACjD,MAAM,OAAO,GAAG,iBAAiB,EAAE,CAAC;IACpC,OAAO,OAAO,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,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CAAC;AAC3C,CAAC,CAAC;AAHW,QAAA,gBAAgB,oBAG3B"}
@@ -1,41 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.getClientAuthenticationWithDependencies = void 0;
7
- const solid_client_authn_core_1 = require("@inrupt/solid-client-authn-core");
8
- const StorageUtility_1 = __importDefault(require("./storage/StorageUtility"));
9
- const ClientAuthentication_1 = __importDefault(require("./ClientAuthentication"));
10
- const OidcLoginHandler_1 = __importDefault(require("./login/oidc/OidcLoginHandler"));
11
- const AuthorizationCodeWithPkceOidcHandler_1 = __importDefault(require("./login/oidc/oidcHandlers/AuthorizationCodeWithPkceOidcHandler"));
12
- const IssuerConfigFetcher_1 = __importDefault(require("./login/oidc/IssuerConfigFetcher"));
13
- const FallbackRedirectHandler_1 = require("./login/oidc/redirectHandler/FallbackRedirectHandler");
14
- const GeneralLogoutHandler_1 = __importDefault(require("./logout/GeneralLogoutHandler"));
15
- const SessionInfoManager_1 = require("./sessionInfo/SessionInfoManager");
16
- const AuthCodeRedirectHandler_1 = require("./login/oidc/redirectHandler/AuthCodeRedirectHandler");
17
- const AggregateRedirectHandler_1 = __importDefault(require("./login/oidc/redirectHandler/AggregateRedirectHandler"));
18
- const BrowserStorage_1 = __importDefault(require("./storage/BrowserStorage"));
19
- const Redirector_1 = __importDefault(require("./login/oidc/Redirector"));
20
- const ClientRegistrar_1 = __importDefault(require("./login/oidc/ClientRegistrar"));
21
- const ErrorOidcHandler_1 = require("./login/oidc/redirectHandler/ErrorOidcHandler");
22
- const TokenRefresher_1 = __importDefault(require("./login/oidc/refresh/TokenRefresher"));
23
- function getClientAuthenticationWithDependencies(dependencies) {
24
- const inMemoryStorage = new solid_client_authn_core_1.InMemoryStorage();
25
- const secureStorage = dependencies.secureStorage || inMemoryStorage;
26
- const insecureStorage = dependencies.insecureStorage || new BrowserStorage_1.default();
27
- const storageUtility = new StorageUtility_1.default(secureStorage, insecureStorage);
28
- const issuerConfigFetcher = new IssuerConfigFetcher_1.default(storageUtility);
29
- const clientRegistrar = new ClientRegistrar_1.default(storageUtility);
30
- const sessionInfoManager = new SessionInfoManager_1.SessionInfoManager(storageUtility);
31
- const tokenRefresher = new TokenRefresher_1.default(storageUtility, issuerConfigFetcher, clientRegistrar);
32
- const loginHandler = new OidcLoginHandler_1.default(storageUtility, new AuthorizationCodeWithPkceOidcHandler_1.default(storageUtility, new Redirector_1.default()), issuerConfigFetcher, clientRegistrar);
33
- const redirectHandler = new AggregateRedirectHandler_1.default([
34
- new ErrorOidcHandler_1.ErrorOidcHandler(),
35
- new AuthCodeRedirectHandler_1.AuthCodeRedirectHandler(storageUtility, sessionInfoManager, issuerConfigFetcher, clientRegistrar, tokenRefresher),
36
- new FallbackRedirectHandler_1.FallbackRedirectHandler(),
37
- ]);
38
- return new ClientAuthentication_1.default(loginHandler, redirectHandler, new GeneralLogoutHandler_1.default(sessionInfoManager), sessionInfoManager, issuerConfigFetcher);
39
- }
40
- exports.getClientAuthenticationWithDependencies = getClientAuthenticationWithDependencies;
41
- //# sourceMappingURL=dependencies.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dependencies.js","sourceRoot":"","sources":["../src/dependencies.ts"],"names":[],"mappings":";;;;;;AA6BA,6EAA4E;AAC5E,8EAA6D;AAC7D,kFAA0D;AAC1D,qFAA6D;AAC7D,0IAAkH;AAClH,2FAAmE;AACnE,kGAA+F;AAC/F,yFAAiE;AACjE,yEAAsE;AACtE,kGAA+F;AAC/F,qHAA6F;AAC7F,8EAAsD;AACtD,yEAAiD;AACjD,mFAA2D;AAC3D,oFAAiF;AACjF,yFAAiE;AAOjE,SAAgB,uCAAuC,CAAC,YAGvD;IACC,MAAM,eAAe,GAAG,IAAI,yCAAe,EAAE,CAAC;IAC9C,MAAM,aAAa,GAAG,YAAY,CAAC,aAAa,IAAI,eAAe,CAAC;IACpE,MAAM,eAAe,GAAG,YAAY,CAAC,eAAe,IAAI,IAAI,wBAAc,EAAE,CAAC;IAE7E,MAAM,cAAc,GAAG,IAAI,wBAAqB,CAC9C,aAAa,EACb,eAAe,CAChB,CAAC;IAEF,MAAM,mBAAmB,GAAG,IAAI,6BAAmB,CAAC,cAAc,CAAC,CAAC;IACpE,MAAM,eAAe,GAAG,IAAI,yBAAe,CAAC,cAAc,CAAC,CAAC;IAE5D,MAAM,kBAAkB,GAAG,IAAI,uCAAkB,CAAC,cAAc,CAAC,CAAC;IAElE,MAAM,cAAc,GAAG,IAAI,wBAAc,CACvC,cAAc,EACd,mBAAmB,EACnB,eAAe,CAChB,CAAC;IAGF,MAAM,YAAY,GAAG,IAAI,0BAAgB,CACvC,cAAc,EACd,IAAI,8CAAoC,CAAC,cAAc,EAAE,IAAI,oBAAU,EAAE,CAAC,EAC1E,mBAAmB,EACnB,eAAe,CAChB,CAAC;IAEF,MAAM,eAAe,GAAG,IAAI,kCAAwB,CAAC;QACnD,IAAI,mCAAgB,EAAE;QACtB,IAAI,iDAAuB,CACzB,cAAc,EACd,kBAAkB,EAClB,mBAAmB,EACnB,eAAe,EACf,cAAc,CACf;QAGD,IAAI,iDAAuB,EAAE;KAC9B,CAAC,CAAC;IAEH,OAAO,IAAI,8BAAoB,CAC7B,YAAY,EACZ,eAAe,EACf,IAAI,8BAAoB,CAAC,kBAAkB,CAAC,EAC5C,kBAAkB,EAClB,mBAAmB,CACpB,CAAC;AACJ,CAAC;AArDD,0FAqDC"}
package/dist/iframe.js DELETED
@@ -1,43 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.postRedirectUrlToParent = exports.setupIframeListener = exports.redirectInIframe = void 0;
4
- let redirectIframe;
5
- function getRedirectIframe() {
6
- if (typeof redirectIframe === "undefined") {
7
- redirectIframe = window.document.createElement("iframe");
8
- redirectIframe.setAttribute("hidden", "true");
9
- redirectIframe.setAttribute("sandbox", "allow-scripts allow-same-origin");
10
- }
11
- return redirectIframe;
12
- }
13
- function redirectInIframe(redirectUrl) {
14
- const iframe = getRedirectIframe();
15
- window.document.body.appendChild(iframe);
16
- iframe.src = redirectUrl;
17
- }
18
- exports.redirectInIframe = redirectInIframe;
19
- function setupIframeListener(handleIframeRedirect) {
20
- if (typeof window === "undefined") {
21
- return;
22
- }
23
- window.addEventListener("message", async (evt) => {
24
- const iframe = getRedirectIframe();
25
- if (evt.origin === window.location.origin &&
26
- evt.source === iframe.contentWindow) {
27
- if (typeof evt.data.redirectUrl === "string") {
28
- await handleIframeRedirect(evt.data.redirectUrl);
29
- }
30
- }
31
- if (window.document.body.contains(iframe)) {
32
- window.document.body.removeChild(iframe);
33
- }
34
- });
35
- }
36
- exports.setupIframeListener = setupIframeListener;
37
- function postRedirectUrlToParent(redirectUrl) {
38
- window.top.postMessage({
39
- redirectUrl,
40
- }, window.location.origin);
41
- }
42
- exports.postRedirectUrlToParent = postRedirectUrlToParent;
43
- //# sourceMappingURL=iframe.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"iframe.js","sourceRoot":"","sources":["../src/iframe.ts"],"names":[],"mappings":";;;AAyBA,IAAI,cAAiC,CAAC;AAItC,SAAS,iBAAiB;IACxB,IAAI,OAAO,cAAc,KAAK,WAAW,EAAE;QACzC,cAAc,GAAG,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;QACzD,cAAc,CAAC,YAAY,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QAC9C,cAAc,CAAC,YAAY,CAAC,SAAS,EAAE,iCAAiC,CAAC,CAAC;KAC3E;IACD,OAAO,cAAc,CAAC;AACxB,CAAC;AASD,SAAgB,gBAAgB,CAAC,WAAmB;IAClD,MAAM,MAAM,GAAG,iBAAiB,EAAE,CAAC;IACnC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IACzC,MAAM,CAAC,GAAG,GAAG,WAAW,CAAC;AAC3B,CAAC;AAJD,4CAIC;AAYD,SAAgB,mBAAmB,CACjC,oBAA+D;IAO/D,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;QACjC,OAAO;KACR;IACD,MAAM,CAAC,gBAAgB,CAAC,SAAS,EAAE,KAAK,EAAE,GAAiB,EAAE,EAAE;QAC7D,MAAM,MAAM,GAAG,iBAAiB,EAAE,CAAC;QACnC,IACE,GAAG,CAAC,MAAM,KAAK,MAAM,CAAC,QAAQ,CAAC,MAAM;YACrC,GAAG,CAAC,MAAM,KAAK,MAAM,CAAC,aAAa,EACnC;YACA,IAAI,OAAO,GAAG,CAAC,IAAI,CAAC,WAAW,KAAK,QAAQ,EAAE;gBAE5C,MAAM,oBAAoB,CAAC,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;aAClD;SACF;QAED,IAAI,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE;YACzC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;SAC1C;IACH,CAAC,CAAC,CAAC;AACL,CAAC;AA3BD,kDA2BC;AAMD,SAAgB,uBAAuB,CAAC,WAAmB;IAEzD,MAAM,CAAC,GAAI,CAAC,WAAW,CACrB;QACE,WAAW;KACZ,EACD,MAAM,CAAC,QAAQ,CAAC,MAAM,CACvB,CAAC;AACJ,CAAC;AARD,0DAQC"}
@@ -1 +0,0 @@
1
- export {};
@@ -1,28 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- const solidClientAuthentication = __importStar(require("./index"));
27
- module.exports = solidClientAuthentication;
28
- //# sourceMappingURL=index.browser.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.browser.js","sourceRoot":"","sources":["../src/index.browser.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAqBA,mEAAqD;AAErD,MAAM,CAAC,OAAO,GAAG,yBAAyB,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 AggregateLoginHandler extends solid_client_authn_core_1.AggregateHandler {
5
- constructor(loginHandlers) {
6
- super(loginHandlers);
7
- }
8
- }
9
- exports.default = AggregateLoginHandler;
10
- //# sourceMappingURL=AggregateLoginHandler.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AggregateLoginHandler.js","sourceRoot":"","sources":["../../src/login/AggregateLoginHandler.ts"],"names":[],"mappings":";;AA6BA,6EAKyC;AAKzC,MAAqB,qBACnB,SAAQ,0CAA8C;IAGtD,YAAY,aAA8B;QACxC,KAAK,CAAC,aAAa,CAAC,CAAC;IACvB,CAAC;CACF;AAPD,wCAOC"}
@@ -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 AggregateOidcHandler extends solid_client_authn_core_1.AggregateHandler {
5
- constructor(oidcLoginHandlers) {
6
- super(oidcLoginHandlers);
7
- }
8
- }
9
- exports.default = AggregateOidcHandler;
10
- //# sourceMappingURL=AggregateOidcHandler.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AggregateOidcHandler.js","sourceRoot":"","sources":["../../../src/login/oidc/AggregateOidcHandler.ts"],"names":[],"mappings":";;AA6BA,6EAKyC;AAKzC,MAAqB,oBACnB,SAAQ,0CAA6C;IAGrD,YAAY,iBAAiC;QAC3C,KAAK,CAAC,iBAAiB,CAAC,CAAC;IAC3B,CAAC;CACF;AAPD,uCAOC"}
@@ -1,51 +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 ClientRegistrar {
5
- constructor(storageUtility) {
6
- this.storageUtility = storageUtility;
7
- }
8
- async getClient(options, issuerConfig) {
9
- var _a;
10
- const [storedClientId, storedClientSecret,] = await Promise.all([
11
- this.storageUtility.getForUser(options.sessionId, "clientId", {
12
- secure: false,
13
- }),
14
- this.storageUtility.getForUser(options.sessionId, "clientSecret", {
15
- secure: false,
16
- }),
17
- ]);
18
- if (storedClientId) {
19
- return {
20
- clientId: storedClientId,
21
- clientSecret: storedClientSecret,
22
- clientType: "dynamic",
23
- };
24
- }
25
- const extendedOptions = { ...options };
26
- extendedOptions.registrationAccessToken =
27
- (_a = extendedOptions.registrationAccessToken) !== null && _a !== void 0 ? _a : (await this.storageUtility.getForUser(options.sessionId, "registrationAccessToken"));
28
- try {
29
- const registeredClient = await (0, oidc_client_ext_1.registerClient)(extendedOptions, issuerConfig);
30
- const infoToSave = {
31
- clientId: registeredClient.clientId,
32
- };
33
- if (registeredClient.clientSecret) {
34
- infoToSave.clientSecret = registeredClient.clientSecret;
35
- }
36
- if (registeredClient.idTokenSignedResponseAlg) {
37
- infoToSave.idTokenSignedResponseAlg =
38
- registeredClient.idTokenSignedResponseAlg;
39
- }
40
- await this.storageUtility.setForUser(extendedOptions.sessionId, infoToSave, {
41
- secure: false,
42
- });
43
- return registeredClient;
44
- }
45
- catch (error) {
46
- throw new Error(`Client registration failed: [${error}]`);
47
- }
48
- }
49
- }
50
- exports.default = ClientRegistrar;
51
- //# sourceMappingURL=ClientRegistrar.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ClientRegistrar.js","sourceRoot":"","sources":["../../../src/login/oidc/ClientRegistrar.ts"],"names":[],"mappings":";;AAiCA,6DAAyD;AAKzD,MAAqB,eAAe;IAClC,YAAoB,cAA+B;QAA/B,mBAAc,GAAd,cAAc,CAAiB;IAAG,CAAC;IAEvD,KAAK,CAAC,SAAS,CACb,OAAgC,EAChC,YAA2B;;QAG3B,MAAM,CACJ,cAAc,EACd,kBAAkB,EAEnB,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;YACpB,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,OAAO,CAAC,SAAS,EAAE,UAAU,EAAE;gBAC5D,MAAM,EAAE,KAAK;aACd,CAAC;YACF,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,OAAO,CAAC,SAAS,EAAE,cAAc,EAAE;gBAChE,MAAM,EAAE,KAAK;aACd,CAAC;SAKH,CAAC,CAAC;QACH,IAAI,cAAc,EAAE;YAClB,OAAO;gBACL,QAAQ,EAAE,cAAc;gBACxB,YAAY,EAAE,kBAAkB;gBAChC,UAAU,EAAE,SAAS;aACtB,CAAC;SACH;QACD,MAAM,eAAe,GAAG,EAAE,GAAG,OAAO,EAAE,CAAC;QAEvC,eAAe,CAAC,uBAAuB;YACrC,MAAA,eAAe,CAAC,uBAAuB,mCACvC,CAAC,MAAM,IAAI,CAAC,cAAc,CAAC,UAAU,CACnC,OAAO,CAAC,SAAS,EACjB,yBAAyB,CAC1B,CAAC,CAAC;QAEL,IAAI;YACF,MAAM,gBAAgB,GAAG,MAAM,IAAA,gCAAc,EAC3C,eAAe,EACf,YAAY,CACb,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