solid-server 5.8.8-3f2fe825 → 5.8.8-4cf09686

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 (45) hide show
  1. package/common/js/index-buttons.mjs +11 -5
  2. package/config/templates/server/index.html +1 -1
  3. package/coverage/tmp/coverage-2264-1767721071420-0.json +1 -0
  4. package/coverage/tmp/{coverage-2270-1766877996470-0.json → coverage-2265-1767721050068-0.json} +1 -1
  5. package/default-templates/server/index.html +1 -1
  6. package/eslint.config.mjs +1 -1
  7. package/lib/create-server.mjs +2 -2
  8. package/lib/handlers/auth-proxy.mjs +4 -5
  9. package/lib/handlers/cors-proxy.mjs +2 -1
  10. package/lib/handlers/get.mjs +3 -3
  11. package/lib/ldp.mjs +2 -2
  12. package/lib/models/account-manager.mjs +3 -3
  13. package/lib/utils.mjs +1 -1
  14. package/package.json +28 -15
  15. package/solid-server-5.8.8.tgz +0 -0
  16. package/test/index.mjs +2 -2
  17. package/test/integration/account-manager-test.mjs +2 -2
  18. package/test/integration/acl-oidc-test.mjs +1 -1
  19. package/test/integration/authentication-oidc-test.mjs +2 -1
  20. package/test/integration/http-copy-test.mjs +2 -2
  21. package/test/integration/oidc-manager-test.mjs +95 -1
  22. package/test/integration/params-test.mjs +5 -5
  23. package/test/resources/accounts/db/oidc/op/clients/{_key_9bb7523c8ddc5c445f210cc36c2d2e26.json → _key_69eaaa0e44e3f95d54a021c5b41e6d72.json} +1 -1
  24. package/test/resources/accounts/db/oidc/rp/clients/_key_https%3A%2F%2Flocalhost%3A3457.json +1 -1
  25. package/test/resources/accounts-scenario/alice/db/oidc/op/clients/{_key_80b4257058990d4e0b6255490b635b19.json → _key_c07d7590e034645477f72d1d3000b04e.json} +1 -1
  26. package/test/resources/accounts-scenario/alice/db/oidc/op/provider.json +538 -313
  27. package/test/resources/accounts-scenario/alice/db/oidc/rp/clients/_key_https%3A%2F%2Flocalhost%3A7000.json +1 -1
  28. package/test/resources/accounts-scenario/bob/db/oidc/op/clients/{_key_01798c37b9663a7129689752efaa329f.json → _key_a10918196ba5adab47f1cf77ec7fa4a6.json} +1 -1
  29. package/test/resources/accounts-scenario/bob/db/oidc/op/provider.json +538 -313
  30. package/test/resources/accounts-scenario/bob/db/oidc/rp/clients/_key_https%3A%2F%2Flocalhost%3A7001.json +1 -1
  31. package/test/resources/accounts-scenario/charlie/db/oidc/op/clients/{_key_0606dda8525a70b23719906c2b258f1b.json → _key_e5c13302f9989c257c6967238e7ae2df.json} +1 -1
  32. package/test/resources/accounts-scenario/charlie/db/oidc/rp/clients/_key_https%3A%2F%2Flocalhost%3A5002.json +1 -1
  33. package/test/resources/accounts-strict-origin-off/alice/db/oidc/op/clients/{_key_cb72eef4d57f4ddd28368afc5534b2d3.json → _key_e262eb5992e08f1284fbda4d22e0f363.json} +1 -1
  34. package/test/resources/accounts-strict-origin-off/alice/db/oidc/rp/clients/_key_https%3A%2F%2Flocalhost%3A7010.json +1 -1
  35. package/test/resources/accounts-strict-origin-off/bob/db/oidc/op/clients/{_key_4c878fad2e43e354847663498e9a3682.json → _key_94d6296485729c61ea033a86a1ee2b9b.json} +1 -1
  36. package/test/resources/accounts-strict-origin-off/bob/db/oidc/rp/clients/_key_https%3A%2F%2Flocalhost%3A7011.json +1 -1
  37. package/test/resources/config/templates/server/index.html +1 -1
  38. package/test/unit/account-manager-test.mjs +2 -2
  39. package/test/unit/create-account-request-test.mjs +1 -1
  40. package/test/unit/email-welcome-test.mjs +1 -1
  41. package/test/utils/index.mjs +2 -2
  42. package/test/utils.mjs +5 -5
  43. package/common/js/auth-buttons.js +0 -67
  44. package/common/js/index-buttons.js +0 -44
  45. package/coverage/tmp/coverage-2269-1766878018867-0.json +0 -1
@@ -1,9 +1,14 @@
1
1
  // ESM version of index-buttons.js
2
+ /* global SolidLogic */
2
3
  'use strict'
3
4
  const keyname = 'SolidServerRootRedirectLink'
5
+ /* function register () {
6
+ alert(2)
7
+ window.location.href = '/register'
8
+ } */
4
9
  document.addEventListener('DOMContentLoaded', async function () {
5
- const authn = UI.authn
6
- const authSession = UI.authn.authSession
10
+ const authn = SolidLogic.authn
11
+ const authSession = SolidLogic.authSession
7
12
 
8
13
  if (!authn.currentUser()) await authn.checkUser()
9
14
  const user = authn.currentUser()
@@ -19,9 +24,10 @@ document.addEventListener('DOMContentLoaded', async function () {
19
24
  window.localStorage.removeItem(keyname)
20
25
  document.getElementById('loggedIn').style.display = 'block'
21
26
  document.getElementById('loggedIn').innerHTML = `<p>Your WebID is : <a href="${webId}">${webId}</a>.</p> <p>Visit your profile to log into your Pod.</p>`
22
- // IF NOT LOGGED IN AND COOKIE DOES NOT EXIST
23
- // SHOW WELCOME, SHOW LOGIN BUTTON
24
- // HIDE LOGIN BUTTON, ADD REGISTER BUTTON
27
+
28
+ // IF NOT LOGGED IN AND COOKIE DOES NOT EXIST
29
+ // SHOW WELCOME, SHOW LOGIN BUTTON
30
+ // HIDE LOGIN BUTTON, ADD REGISTER BUTTON
25
31
  } else {
26
32
  const loginArea = document.getElementById('loginStatusArea')
27
33
  const html = `<input type="button" onclick="window.location.href='/register'" value="Register to get a Pod" class="register-button" style="padding: 1em; border-radius:0.2em; font-size: 100%;margin: 0.75em 0 0.75em 0.5em !important; padding: 0.5em !important;background-color: #efe;">`
@@ -48,7 +48,7 @@
48
48
  </div> <!-- end container-->
49
49
 
50
50
  <script src="/mashlib.js"></script>
51
- <script src="/common/js/index-buttons.js"></script>
51
+ <script src="/common/js/index-buttons.mjs"></script>
52
52
 
53
53
  </body>
54
54
  </html>