solid-server 5.8.7 → 5.8.8-22f4cfec
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/CHANGELOG.md +0 -0
- package/CONTRIBUTING.md +0 -0
- package/CONTRIBUTORS.md +0 -0
- package/Dockerfile +0 -0
- package/LICENSE.md +0 -0
- package/README.md +0 -0
- package/bin/config.json +0 -0
- package/bin/lib/cli-utils.mjs +54 -0
- package/bin/lib/cli.mjs +44 -0
- package/bin/lib/{init.js → init.mjs} +93 -94
- package/bin/lib/{invalidUsernames.js → invalidUsernames.mjs} +136 -148
- package/bin/lib/{migrateLegacyResources.js → migrateLegacyResources.mjs} +64 -69
- package/bin/lib/{options.js → options.mjs} +379 -405
- package/bin/lib/{start.js → start.mjs} +124 -148
- package/bin/lib/{updateIndex.js → updateIndex.mjs} +55 -56
- package/bin/solid +2 -2
- package/bin/solid-test +0 -0
- package/common/css/bootstrap.min.css +6 -0
- package/common/css/solid.css +0 -0
- package/common/fonts/glyphicons-halflings-regular.eot +0 -0
- package/common/fonts/glyphicons-halflings-regular.svg +0 -0
- package/common/fonts/glyphicons-halflings-regular.ttf +0 -0
- package/common/fonts/glyphicons-halflings-regular.woff +0 -0
- package/common/fonts/glyphicons-halflings-regular.woff2 +0 -0
- package/common/img/solid-emblem.svg +0 -0
- package/common/js/auth-buttons.js +0 -0
- package/common/js/auth-buttons.mjs +57 -0
- package/common/js/index-buttons.js +0 -0
- package/common/js/index-buttons.mjs +43 -0
- package/common/js/solid.js +0 -0
- package/common/js/solid.mjs +456 -0
- package/common/well-known/security.txt +0 -0
- package/config/defaults.js +0 -0
- package/config/defaults.mjs +22 -0
- package/config/templates/emails/delete-account.js +49 -0
- package/config/templates/emails/delete-account.mjs +31 -0
- package/config/templates/emails/invalid-username.js +30 -0
- package/config/templates/emails/invalid-username.mjs +27 -0
- package/config/templates/emails/reset-password.js +49 -0
- package/config/templates/emails/reset-password.mjs +31 -0
- package/config/templates/emails/welcome.js +39 -0
- package/config/templates/emails/welcome.mjs +23 -0
- package/config/templates/new-account/favicon.ico +0 -0
- package/config/templates/new-account/favicon.ico.acl +26 -0
- package/config/templates/new-account/profile/card$.ttl +26 -0
- package/config/templates/new-account/robots.txt +3 -0
- package/config/templates/new-account/robots.txt.acl +26 -0
- package/config/templates/new-account/settings/prefs.ttl +15 -0
- package/config/templates/new-account/settings/privateTypeIndex.ttl +4 -0
- package/config/templates/new-account/settings/publicTypeIndex.ttl +4 -0
- package/{default-templates/new-account/.meta.acl → config/templates/new-account/settings/publicTypeIndex.ttl.acl} +4 -4
- package/config/templates/new-account/settings/serverSide.ttl.acl +13 -0
- package/config/templates/new-account/settings/serverSide.ttl.inactive +12 -0
- package/config/templates/server/favicon.ico +0 -0
- package/{.well-known/.acl → config/templates/server/favicon.ico.acl} +2 -2
- package/config/templates/server/index.html +54 -0
- package/config/templates/server/robots.txt +3 -0
- package/{default-templates/server/.well-known/.acl → config/templates/server/robots.txt.acl} +2 -2
- package/config/usernames-blacklist.json +0 -0
- package/config/views/account/account-deleted.hbs +17 -0
- package/config/views/account/delete-confirm.hbs +51 -0
- package/config/views/account/delete-link-sent.hbs +17 -0
- package/config/views/account/delete.hbs +51 -0
- package/config/views/account/invalid-username.hbs +22 -0
- package/config/views/account/register-disabled.hbs +6 -0
- package/config/views/account/register-form.hbs +133 -0
- package/config/views/account/register.hbs +24 -0
- package/config/views/auth/auth-hidden-fields.hbs +8 -0
- package/config/views/auth/change-password.hbs +58 -0
- package/config/views/auth/goodbye.hbs +23 -0
- package/config/views/auth/login-required.hbs +34 -0
- package/config/views/auth/login-tls.hbs +11 -0
- package/config/views/auth/login-username-password.hbs +28 -0
- package/config/views/auth/login.hbs +55 -0
- package/config/views/auth/no-permission.hbs +29 -0
- package/config/views/auth/password-changed.hbs +27 -0
- package/config/views/auth/reset-link-sent.hbs +21 -0
- package/config/views/auth/reset-password.hbs +52 -0
- package/config/views/auth/sharing.hbs +49 -0
- package/config/views/shared/create-account.hbs +8 -0
- package/config/views/shared/error.hbs +5 -0
- package/config.json-default +0 -0
- package/coverage/tmp/coverage-2260-1766832656715-0.json +1 -0
- package/coverage/tmp/coverage-2261-1766832635310-0.json +1 -0
- package/default-templates/emails/delete-account.js +0 -0
- package/default-templates/emails/delete-account.mjs +31 -0
- package/default-templates/emails/invalid-username.js +0 -0
- package/default-templates/emails/invalid-username.mjs +27 -0
- package/default-templates/emails/reset-password.js +0 -0
- package/default-templates/emails/reset-password.mjs +31 -0
- package/default-templates/emails/welcome.js +0 -0
- package/default-templates/emails/welcome.mjs +23 -0
- package/default-templates/new-account/favicon.ico +0 -0
- package/default-templates/new-account/favicon.ico.acl +0 -0
- package/default-templates/new-account/profile/card$.ttl +0 -0
- package/default-templates/new-account/robots.txt +0 -0
- package/default-templates/new-account/robots.txt.acl +0 -0
- package/default-templates/new-account/settings/prefs.ttl +0 -0
- package/default-templates/new-account/settings/privateTypeIndex.ttl +0 -0
- package/default-templates/new-account/settings/publicTypeIndex.ttl +0 -0
- package/default-templates/new-account/settings/publicTypeIndex.ttl.acl +0 -0
- package/default-templates/new-account/settings/serverSide.ttl.acl +0 -0
- package/default-templates/new-account/settings/serverSide.ttl.inactive +0 -0
- package/default-templates/server/favicon.ico +0 -0
- package/default-templates/server/favicon.ico.acl +0 -0
- package/default-templates/server/index.html +0 -0
- package/default-templates/server/robots.txt +0 -0
- package/default-templates/server/robots.txt.acl +0 -0
- package/default-views/account/account-deleted.hbs +0 -0
- package/default-views/account/delete-confirm.hbs +0 -0
- package/default-views/account/delete-link-sent.hbs +0 -0
- package/default-views/account/delete.hbs +0 -0
- package/default-views/account/invalid-username.hbs +0 -0
- package/default-views/account/register-disabled.hbs +0 -0
- package/default-views/account/register-form.hbs +0 -0
- package/default-views/account/register.hbs +0 -0
- package/default-views/auth/auth-hidden-fields.hbs +0 -0
- package/default-views/auth/change-password.hbs +0 -0
- package/default-views/auth/goodbye.hbs +0 -0
- package/default-views/auth/login-required.hbs +0 -0
- package/default-views/auth/login-tls.hbs +0 -0
- package/default-views/auth/login-username-password.hbs +0 -0
- package/default-views/auth/login.hbs +0 -0
- package/default-views/auth/no-permission.hbs +0 -0
- package/default-views/auth/password-changed.hbs +0 -0
- package/default-views/auth/reset-link-sent.hbs +0 -0
- package/default-views/auth/reset-password.hbs +0 -0
- package/default-views/auth/sharing.hbs +0 -0
- package/default-views/shared/create-account.hbs +0 -0
- package/default-views/shared/error.hbs +0 -0
- package/docker-compose.yml +0 -0
- package/docker-image/CONTRIBUTING.md +33 -0
- package/docker-image/Makefile +32 -0
- package/docker-image/README.md +65 -0
- package/docker-image/examples/docker-compose.all-in-one.yml +76 -0
- package/docker-image/examples/docker-compose.nginx.yml +51 -0
- package/docker-image/examples/docker-compose.simple.yml +34 -0
- package/docker-image/src/Dockerfile +34 -0
- package/docker-image/src/checks.sh +56 -0
- package/docker-image/src/create-temporary-cert.sh +14 -0
- package/docker-image/src/entrypoint.sh +8 -0
- package/{common/img/.gitkeep → docker-image/test/__init__.py} +0 -0
- package/docker-image/test/conftest.py +15 -0
- package/docker-image/test/test_image_foundations.py +51 -0
- package/docker-image/test/test_non_accessible_key_cert.py +36 -0
- package/docker-image/test/test_precondition_checks.py +41 -0
- package/docker-image/test/test_solid_default_config.py +66 -0
- package/docker-image/test/test_volumes.py +55 -0
- package/docker-image/test/wait_for_container.py +8 -0
- package/docs/how-to-delete-your-account.md +0 -0
- package/docs/login-and-grant-access-to-application.md +0 -0
- package/examples/custom-error-handling.js +0 -0
- package/examples/custom-error-handling.mjs +29 -0
- package/examples/ldp-with-webid.js +0 -0
- package/examples/ldp-with-webid.mjs +12 -0
- package/examples/simple-express-app.js +0 -0
- package/examples/simple-express-app.mjs +20 -0
- package/examples/simple-ldp-server.js +0 -0
- package/examples/simple-ldp-server.mjs +8 -0
- package/favicon.ico +0 -0
- package/favicon.ico.acl +0 -0
- package/index.cjs +4 -0
- package/index.html +0 -0
- package/index.mjs +23 -0
- package/lib/{acl-checker.js → acl-checker.mjs} +13 -15
- package/lib/api/accounts/{user-accounts.js → user-accounts.mjs} +17 -16
- package/lib/api/authn/{force-user.js → force-user.mjs} +5 -4
- package/lib/api/authn/index.mjs +8 -0
- package/lib/api/authn/{webid-oidc.js → webid-oidc.mjs} +27 -20
- package/lib/api/authn/{webid-tls.js → webid-tls.mjs} +12 -11
- package/lib/api/index.mjs +7 -0
- package/lib/{capability-discovery.js → capability-discovery.mjs} +3 -6
- package/lib/common/{fs-utils.js → fs-utils.mjs} +35 -43
- package/lib/common/template-utils.mjs +29 -0
- package/lib/common/{user-utils.js → user-utils.mjs} +24 -28
- package/lib/{create-app.js → create-app.mjs} +372 -361
- package/lib/{create-server.js → create-server.mjs} +32 -11
- package/lib/debug.mjs +37 -0
- package/lib/handlers/{allow.js → allow.mjs} +79 -83
- package/lib/handlers/{auth-proxy.js → auth-proxy.mjs} +4 -5
- package/lib/handlers/{copy.js → copy.mjs} +37 -39
- package/lib/handlers/{cors-proxy.js → cors-proxy.mjs} +9 -11
- package/lib/handlers/{delete.js → delete.mjs} +20 -22
- package/lib/handlers/{error-pages.js → error-pages.mjs} +144 -212
- package/lib/handlers/{get.js → get.mjs} +254 -252
- package/lib/handlers/{index.js → index.mjs} +7 -8
- package/lib/handlers/{notify.js → notify.mjs} +8 -10
- package/lib/handlers/{options.js → options.mjs} +3 -5
- package/lib/handlers/patch/{n3-patch-parser.js → n3-patch-parser.mjs} +57 -59
- package/lib/handlers/patch/{sparql-update-parser.js → sparql-update-parser.mjs} +14 -16
- package/lib/handlers/{patch.js → patch.mjs} +241 -235
- package/lib/handlers/{post.js → post.mjs} +101 -99
- package/lib/handlers/{put.js → put.mjs} +101 -105
- package/lib/handlers/{restrict-to-top-domain.js → restrict-to-top-domain.mjs} +2 -2
- package/lib/{header.js → header.mjs} +138 -143
- package/lib/{http-error.js → http-error.mjs} +35 -34
- package/lib/{ldp-container.js → ldp-container.mjs} +10 -12
- package/lib/ldp-copy.mjs +82 -0
- package/lib/ldp-middleware.mjs +38 -0
- package/lib/{ldp.js → ldp.mjs} +286 -75
- package/lib/{lock.js → lock.mjs} +10 -10
- package/lib/{metadata.js → metadata.mjs} +11 -11
- package/lib/models/account-manager.mjs +297 -0
- package/lib/models/account-template.mjs +70 -0
- package/lib/models/authenticator.mjs +161 -0
- package/lib/models/oidc-manager.mjs +23 -0
- package/lib/models/solid-host.mjs +63 -0
- package/lib/models/user-account.mjs +50 -0
- package/lib/models/webid-tls-certificate.mjs +97 -0
- package/lib/{payment-pointer-discovery.js → payment-pointer-discovery.mjs} +5 -8
- package/lib/{rdf-notification-template.js → rdf-notification-template.mjs} +3 -5
- package/lib/requests/add-cert-request.mjs +70 -0
- package/lib/requests/auth-request.mjs +151 -0
- package/lib/requests/{create-account-request.js → create-account-request.mjs} +249 -452
- package/lib/requests/delete-account-confirm-request.mjs +85 -0
- package/lib/requests/{delete-account-request.js → delete-account-request.mjs} +73 -134
- package/lib/requests/login-request.mjs +89 -0
- package/lib/requests/{password-change-request.js → password-change-request.mjs} +132 -201
- package/lib/requests/{password-reset-email-request.js → password-reset-email-request.mjs} +123 -202
- package/lib/requests/password-reset-request.mjs +47 -0
- package/lib/requests/register-request.mjs +48 -0
- package/lib/requests/{sharing-request.js → sharing-request.mjs} +174 -261
- package/lib/{resource-mapper.js → resource-mapper.mjs} +7 -6
- package/lib/{server-config.js → server-config.mjs} +15 -20
- package/lib/services/{blacklist-service.js → blacklist-service.mjs} +36 -33
- package/lib/services/email-service.mjs +76 -0
- package/lib/services/{token-service.js → token-service.mjs} +36 -44
- package/lib/{utils.js → utils.mjs} +309 -254
- package/lib/webid/{index.js → index.mjs} +9 -13
- package/lib/webid/lib/{get.js → get.mjs} +31 -35
- package/lib/webid/lib/{parse.js → parse.mjs} +10 -12
- package/lib/webid/lib/verify.mjs +77 -0
- package/lib/webid/tls/generate.mjs +53 -0
- package/lib/webid/tls/index.mjs +7 -0
- package/package.json +60 -40
- package/renovate.json +0 -0
- package/robots.txt +0 -0
- package/robots.txt.acl +0 -0
- package/solid-server-5.8.8.tgz +0 -0
- package/static/account-recovery.html +0 -0
- package/static/popup-redirect.html +0 -0
- package/static/signup.html +0 -0
- package/static/signup.html.acl +0 -0
- package/test/index.mjs +168 -0
- package/test/integration/account-creation-tls-test.mjs +127 -0
- package/test/integration/account-manager-test.mjs +151 -0
- package/test/integration/account-template-test.mjs +136 -0
- package/test/integration/acl-oidc-test.mjs +1048 -0
- package/test/integration/acl-tls-test.mjs +964 -0
- package/test/integration/auth-proxy-test.mjs +144 -0
- package/test/integration/authentication-oidc-test.mjs +812 -0
- package/test/integration/authentication-oidc-with-strict-origins-turned-off-test.mjs +638 -0
- package/test/integration/capability-discovery-test.mjs +116 -0
- package/test/integration/cors-proxy-test.mjs +145 -0
- package/test/integration/errors-oidc-test.mjs +109 -0
- package/test/integration/errors-test.mjs +49 -0
- package/test/integration/formats-test.mjs +136 -0
- package/test/integration/header-test.mjs +101 -0
- package/test/integration/http-copy-test.mjs +109 -0
- package/test/integration/http-test.mjs +1197 -0
- package/test/integration/ldp-test.mjs +528 -0
- package/test/integration/oidc-manager-test.mjs +42 -0
- package/test/integration/params-test.mjs +192 -0
- package/test/integration/patch-sparql-update-test.mjs +195 -0
- package/test/integration/patch-test.mjs +590 -0
- package/test/integration/payment-pointer-test.mjs +155 -0
- package/test/integration/prep-test.mjs +314 -0
- package/test/integration/quota-test.mjs +51 -0
- package/test/integration/special-root-acl-handling-test.mjs +68 -0
- package/test/integration/validate-tts-test.mjs +57 -0
- package/test/integration/www-account-creation-oidc-test.mjs +311 -0
- package/test/keys/cert.pem +21 -0
- package/test/keys/client-cert.pem +19 -0
- package/test/keys/client-key.pem +27 -0
- package/test/keys/key.pem +27 -0
- package/test/keys/user1-cert.pem +23 -0
- package/test/keys/user1-key.pem +28 -0
- package/test/keys/user2-cert.pem +23 -0
- package/test/keys/user2-key.pem +27 -0
- package/test/mocha.opts +2 -0
- package/test/resources/Makefile +146 -0
- package/test/resources/accounts/alice.localhost/profile/card +0 -0
- package/test/resources/accounts/db/oidc/op/clients/_key_5319f8e8e4ea3214c2e92b252520d355.json +1 -0
- package/test/resources/accounts/db/oidc/op/provider.json +763 -0
- package/test/resources/accounts/db/oidc/rp/clients/_key_https%3A%2F%2Flocalhost%3A3457.json +1 -0
- package/test/resources/accounts/localhost/samplePublicContainer/nicola.jpg +0 -0
- package/test/resources/accounts/tim.localhost/hello.html +9 -0
- package/test/resources/accounts/tim.localhost/profile/card +0 -0
- package/test/resources/accounts-acl/config/templates/emails/welcome-test.js +39 -0
- package/test/resources/accounts-acl/config/templates/new-account/favicon.ico +0 -0
- package/test/resources/accounts-acl/config/templates/new-account/favicon.ico.acl +26 -0
- package/test/resources/accounts-acl/config/templates/new-account/index.html +28 -0
- package/test/resources/accounts-acl/config/templates/new-account/index.html.acl +22 -0
- package/test/resources/accounts-acl/config/templates/new-account/profile/card +27 -0
- package/{default-templates/new-account/inbox/.acl → test/resources/accounts-acl/config/templates/new-account/profile/card.acl} +5 -6
- package/test/resources/accounts-acl/config/templates/new-account/settings/prefs.ttl +9 -0
- package/test/resources/accounts-acl/config/templates/new-account/settings/privateTypeIndex.ttl +4 -0
- package/test/resources/accounts-acl/config/templates/new-account/settings/publicTypeIndex.ttl +4 -0
- package/test/resources/accounts-acl/config/templates/new-account/settings/publicTypeIndex.ttl.acl +25 -0
- package/test/resources/accounts-acl/config/templates/new-account/settings/serverSide.ttl +14 -0
- package/test/resources/accounts-acl/config/templates/server/index.html +35 -0
- package/{.acl → test/resources/accounts-acl/config/templates/server/index.html.acl} +4 -3
- package/test/resources/accounts-acl/config/views/account/register.hbs +58 -0
- package/test/resources/accounts-acl/config/views/auth/consent.hbs +49 -0
- package/test/resources/accounts-acl/config/views/auth/goodbye.hbs +20 -0
- package/test/resources/accounts-acl/config/views/auth/login-required.hbs +0 -0
- package/test/resources/accounts-acl/config/views/auth/login.hbs +51 -0
- package/test/resources/accounts-acl/config/views/auth/no-permission.hbs +0 -0
- package/test/resources/accounts-acl/db/oidc/op/clients/_key_77bb3b35edb1f3f7b887c25d1211a491.json +1 -0
- package/test/resources/accounts-acl/db/oidc/op/provider.json +763 -0
- package/test/resources/accounts-acl/db/oidc/rp/clients/_key_https%3A%2F%2Flocalhost%3A7777.json +1 -0
- package/test/resources/accounts-acl/localhost/favicon.ico +0 -0
- package/test/resources/accounts-acl/localhost/index.html +35 -0
- package/{default-templates/server/.acl → test/resources/accounts-acl/localhost/index.html.acl} +4 -3
- package/test/resources/accounts-acl/nicola.localhost/index.html +1 -0
- package/test/resources/accounts-acl/nicola.localhost/index.html.acl +10 -0
- package/test/resources/accounts-acl/quota/settings/serverSide.ttl +11 -0
- package/test/resources/accounts-acl/tim.localhost/append-acl/abc.ttl +1 -0
- package/test/resources/accounts-acl/tim.localhost/append-acl/abc.ttl.acl +8 -0
- package/test/resources/accounts-acl/tim.localhost/append-acl/abc2.ttl +1 -0
- package/test/resources/accounts-acl/tim.localhost/append-acl/abc2.ttl.acl +8 -0
- package/test/resources/accounts-acl/tim.localhost/fake-account/hello.html +9 -0
- package/test/resources/accounts-acl/tim.localhost/group/test-folder/group-listing-error.ttl +1 -0
- package/test/resources/accounts-acl/tim.localhost/group/test-folder/group-listing.ttl +14 -0
- package/test/resources/accounts-acl/tim.localhost/group/test-folder/some-other-file.txt +1 -0
- package/test/resources/accounts-acl/tim.localhost/multi-server/protected.txt +1 -0
- package/test/resources/accounts-acl/tim.localhost/multi-server/protected.txt.acl +8 -0
- package/test/resources/accounts-acl/tim.localhost/no-acl/test-file.html +1 -0
- package/test/resources/accounts-acl/tim.localhost/read-acl/deeper-tree/acls-only-on-top/example.ttl +1 -0
- package/test/resources/accounts-acl/tim.localhost/write-acl/test-file$.txt +1 -0
- package/test/resources/accounts-scenario/alice/db/oidc/op/clients/_key_9c0fd8442675a1afbe5115b9ae300c65.json +1 -0
- package/test/resources/accounts-scenario/alice/db/oidc/op/provider.json +761 -0
- package/test/resources/accounts-scenario/alice/db/oidc/rp/clients/_key_https%3A%2F%2Flocalhost%3A7000.json +1 -0
- package/test/resources/accounts-scenario/alice/private-for-alice.txt +1 -0
- package/test/resources/accounts-scenario/alice/private-for-alice.txt.acl +12 -0
- package/test/resources/accounts-scenario/alice/profile/card$.ttl +10 -0
- package/test/resources/accounts-scenario/bob/db/oidc/op/clients/_key_f15f340b6dc71b68d20eca0d7e87a972.json +1 -0
- package/test/resources/accounts-scenario/bob/db/oidc/op/provider.json +761 -0
- package/test/resources/accounts-scenario/bob/db/oidc/rp/clients/_key_https%3A%2F%2Flocalhost%3A7001.json +1 -0
- package/test/resources/accounts-scenario/bob/profile/card$.ttl +5 -0
- package/test/resources/accounts-scenario/bob/shared-with-alice.txt +1 -0
- package/test/resources/accounts-scenario/bob/shared-with-alice.txt.acl +15 -0
- package/test/resources/accounts-scenario/charlie/db/oidc/op/clients/_key_7c634dfe325475cc8750e19c72acf6d9.json +1 -0
- package/test/resources/accounts-scenario/charlie/db/oidc/op/provider.json +759 -0
- package/test/resources/accounts-scenario/charlie/db/oidc/rp/clients/_key_https%3A%2F%2Flocalhost%3A5002.json +1 -0
- package/test/resources/accounts-scenario/charlie/profile/card$.ttl +5 -0
- package/test/resources/accounts-strict-origin-off/alice/db/oidc/op/clients/_key_3f1cecaefd21253767f6e047bd9b572f.json +1 -0
- package/test/resources/accounts-strict-origin-off/alice/db/oidc/op/provider.json +763 -0
- package/test/resources/accounts-strict-origin-off/alice/db/oidc/rp/clients/_key_https%3A%2F%2Flocalhost%3A7010.json +1 -0
- package/test/resources/accounts-strict-origin-off/alice/private-for-alice.txt +1 -0
- package/test/resources/accounts-strict-origin-off/alice/private-for-alice.txt.acl +12 -0
- package/test/resources/accounts-strict-origin-off/alice/profile/card$.ttl +10 -0
- package/test/resources/accounts-strict-origin-off/bob/db/oidc/op/clients/_key_a17f603b5907c97a5fac61a2eea7ecb2.json +1 -0
- package/test/resources/accounts-strict-origin-off/bob/db/oidc/op/provider.json +763 -0
- package/test/resources/accounts-strict-origin-off/bob/db/oidc/rp/clients/_key_https%3A%2F%2Flocalhost%3A7011.json +1 -0
- package/test/resources/accounts-strict-origin-off/bob/shared-with-alice.txt +1 -0
- package/test/resources/accounts-strict-origin-off/bob/shared-with-alice.txt.acl +15 -0
- package/test/resources/acl-tls/config/templates/emails/delete-account.js +49 -0
- package/test/resources/acl-tls/config/templates/emails/invalid-username.js +30 -0
- package/test/resources/acl-tls/config/templates/emails/reset-password.js +49 -0
- package/test/resources/acl-tls/config/templates/emails/welcome.js +39 -0
- package/test/resources/acl-tls/config/templates/new-account/favicon.ico +0 -0
- package/test/resources/acl-tls/config/templates/new-account/favicon.ico.acl +26 -0
- package/test/resources/acl-tls/config/templates/new-account/profile/card$.ttl +26 -0
- package/test/resources/acl-tls/config/templates/new-account/robots.txt +3 -0
- package/test/resources/acl-tls/config/templates/new-account/robots.txt.acl +26 -0
- package/test/resources/acl-tls/config/templates/new-account/settings/prefs.ttl +15 -0
- package/test/resources/acl-tls/config/templates/new-account/settings/privateTypeIndex.ttl +4 -0
- package/test/resources/acl-tls/config/templates/new-account/settings/publicTypeIndex.ttl +4 -0
- package/test/resources/acl-tls/config/templates/new-account/settings/publicTypeIndex.ttl.acl +25 -0
- package/test/resources/acl-tls/config/templates/new-account/settings/serverSide.ttl.acl +13 -0
- package/test/resources/acl-tls/config/templates/new-account/settings/serverSide.ttl.inactive +12 -0
- package/test/resources/acl-tls/config/templates/server/favicon.ico +0 -0
- package/test/resources/acl-tls/config/templates/server/favicon.ico.acl +15 -0
- package/test/resources/acl-tls/config/templates/server/index.html +55 -0
- package/test/resources/acl-tls/config/templates/server/robots.txt +3 -0
- package/test/resources/acl-tls/config/templates/server/robots.txt.acl +15 -0
- package/test/resources/acl-tls/config/views/account/account-deleted.hbs +17 -0
- package/test/resources/acl-tls/config/views/account/delete-confirm.hbs +51 -0
- package/test/resources/acl-tls/config/views/account/delete-link-sent.hbs +17 -0
- package/test/resources/acl-tls/config/views/account/delete.hbs +51 -0
- package/test/resources/acl-tls/config/views/account/invalid-username.hbs +22 -0
- package/test/resources/acl-tls/config/views/account/register-disabled.hbs +6 -0
- package/test/resources/acl-tls/config/views/account/register-form.hbs +147 -0
- package/test/resources/acl-tls/config/views/account/register.hbs +24 -0
- package/test/resources/acl-tls/config/views/auth/auth-hidden-fields.hbs +8 -0
- package/test/resources/acl-tls/config/views/auth/change-password.hbs +58 -0
- package/test/resources/acl-tls/config/views/auth/goodbye.hbs +23 -0
- package/test/resources/acl-tls/config/views/auth/login-required.hbs +34 -0
- package/test/resources/acl-tls/config/views/auth/login-tls.hbs +11 -0
- package/test/resources/acl-tls/config/views/auth/login-username-password.hbs +28 -0
- package/test/resources/acl-tls/config/views/auth/login.hbs +55 -0
- package/test/resources/acl-tls/config/views/auth/no-permission.hbs +29 -0
- package/test/resources/acl-tls/config/views/auth/password-changed.hbs +27 -0
- package/test/resources/acl-tls/config/views/auth/reset-link-sent.hbs +21 -0
- package/test/resources/acl-tls/config/views/auth/reset-password.hbs +52 -0
- package/test/resources/acl-tls/config/views/auth/sharing.hbs +49 -0
- package/test/resources/acl-tls/config/views/shared/create-account.hbs +8 -0
- package/test/resources/acl-tls/config/views/shared/error.hbs +5 -0
- package/test/resources/acl-tls/localhost/favicon.ico +0 -0
- package/test/resources/acl-tls/localhost/favicon.ico.acl +15 -0
- package/test/resources/acl-tls/localhost/index.html +48 -0
- package/test/resources/acl-tls/localhost/robots.txt +3 -0
- package/test/resources/acl-tls/localhost/robots.txt.acl +15 -0
- package/test/resources/acl-tls/tim.localhost/append-acl/abc.ttl +1 -0
- package/test/resources/acl-tls/tim.localhost/append-acl/abc.ttl.acl +8 -0
- package/test/resources/acl-tls/tim.localhost/append-acl/abc2.ttl +1 -0
- package/test/resources/acl-tls/tim.localhost/append-acl/abc2.ttl.acl +8 -0
- package/test/resources/acl-tls/tim.localhost/fake-account/hello.html +9 -0
- package/test/resources/acl-tls/tim.localhost/no-acl/test-file.html +1 -0
- package/test/resources/acl-tls/tim.localhost/profile/card$.ttl +17 -0
- package/test/resources/acl-tls/write-acl/test-file$.ttl +1 -0
- package/test/resources/auth-proxy/index.html +0 -0
- package/test/resources/auth-proxy/index.html.acl +0 -0
- package/test/resources/config/templates/emails/delete-account.js +49 -0
- package/test/resources/config/templates/emails/delete-account.mjs +31 -0
- package/test/resources/config/templates/emails/invalid-username.js +30 -0
- package/test/resources/config/templates/emails/invalid-username.mjs +27 -0
- package/test/resources/config/templates/emails/reset-password.js +49 -0
- package/test/resources/config/templates/emails/reset-password.mjs +31 -0
- package/test/resources/config/templates/emails/welcome.js +39 -0
- package/test/resources/config/templates/emails/welcome.mjs +23 -0
- package/test/resources/config/templates/new-account/favicon.ico +0 -0
- package/test/resources/config/templates/new-account/favicon.ico.acl +26 -0
- package/test/resources/config/templates/new-account/profile/card$.ttl +26 -0
- package/test/resources/config/templates/new-account/robots.txt +3 -0
- package/test/resources/config/templates/new-account/robots.txt.acl +26 -0
- package/test/resources/config/templates/new-account/settings/prefs.ttl +15 -0
- package/test/resources/config/templates/new-account/settings/privateTypeIndex.ttl +4 -0
- package/test/resources/config/templates/new-account/settings/publicTypeIndex.ttl +4 -0
- package/test/resources/config/templates/new-account/settings/publicTypeIndex.ttl.acl +25 -0
- package/test/resources/config/templates/new-account/settings/serverSide.ttl.acl +13 -0
- package/test/resources/config/templates/new-account/settings/serverSide.ttl.inactive +12 -0
- package/test/resources/config/templates/server/favicon.ico +0 -0
- package/test/resources/config/templates/server/favicon.ico.acl +15 -0
- package/test/resources/config/templates/server/index.html +54 -0
- package/test/resources/config/templates/server/robots.txt +3 -0
- package/test/resources/config/templates/server/robots.txt.acl +15 -0
- package/test/resources/config/views/account/account-deleted.hbs +17 -0
- package/test/resources/config/views/account/delete-confirm.hbs +51 -0
- package/test/resources/config/views/account/delete-link-sent.hbs +17 -0
- package/test/resources/config/views/account/delete.hbs +51 -0
- package/test/resources/config/views/account/invalid-username.hbs +22 -0
- package/test/resources/config/views/account/register-disabled.hbs +6 -0
- package/test/resources/config/views/account/register-form.hbs +133 -0
- package/test/resources/config/views/account/register.hbs +24 -0
- package/test/resources/config/views/auth/auth-hidden-fields.hbs +8 -0
- package/test/resources/config/views/auth/change-password.hbs +58 -0
- package/test/resources/config/views/auth/goodbye.hbs +23 -0
- package/test/resources/config/views/auth/login-required.hbs +34 -0
- package/test/resources/config/views/auth/login-tls.hbs +11 -0
- package/test/resources/config/views/auth/login-username-password.hbs +28 -0
- package/test/resources/config/views/auth/login.hbs +55 -0
- package/test/resources/config/views/auth/no-permission.hbs +29 -0
- package/test/resources/config/views/auth/password-changed.hbs +27 -0
- package/test/resources/config/views/auth/reset-link-sent.hbs +21 -0
- package/test/resources/config/views/auth/reset-password.hbs +52 -0
- package/test/resources/config/views/auth/sharing.hbs +49 -0
- package/test/resources/config/views/shared/create-account.hbs +8 -0
- package/test/resources/config/views/shared/error.hbs +5 -0
- package/test/resources/empty.spatch +0 -0
- package/test/resources/errorPages/401.html +5 -0
- package/test/resources/errorPages/403.html +5 -0
- package/test/resources/errorPages/404.html +5 -0
- package/test/resources/errorPages/405.html +5 -0
- package/test/resources/errorPages/415.html +5 -0
- package/test/resources/errorPages/500.html +5 -0
- package/test/resources/example_spkac.cnf +1 -0
- package/test/resources/external-servers/example.com/jwks.json +81 -0
- package/test/resources/external-servers/example.com/openid-configuration.json +53 -0
- package/test/resources/favicon.ico +0 -0
- package/test/resources/favicon.ico.acl +15 -0
- package/test/resources/headers/index.html +0 -0
- package/test/resources/headers/public-ra +0 -0
- package/test/resources/headers/public-ra.acl +7 -0
- package/test/resources/headers/user-rw-public-r +0 -0
- package/test/resources/headers/user-rw-public-r.acl +12 -0
- package/test/resources/headers/user-rwac-public-0 +0 -0
- package/test/resources/headers/user-rwac-public-0.acl +7 -0
- package/test/resources/hello.html +3 -0
- package/test/resources/invalid1.ttl +13 -0
- package/test/resources/invalid2.ttl +9 -0
- package/test/resources/ldpatch-example-final.ttl +23 -0
- package/test/resources/ldpatch-example-initial.ttl +22 -0
- package/test/resources/ldpatch-example-patch-1.spatch +8 -0
- package/test/resources/ldpatch-example-patch-2.spatch +12 -0
- package/test/resources/ldpatch-example-patch-3.spatch +14 -0
- package/test/resources/ldpatch-example-patch.ldpatch +25 -0
- package/test/resources/ldpatch-example-patch.spatch +24 -0
- package/test/resources/lennon.jsonld +7 -0
- package/test/resources/lfs-0.sparql +9 -0
- package/test/resources/lfs-1-final.json +10 -0
- package/test/resources/lfs-1.sparql +11 -0
- package/test/resources/messaging-scenario/user1.databox.me/profile/card +21 -0
- package/test/resources/nicola.jpg +0 -0
- package/test/resources/patch/append-only.ttl +2 -0
- package/test/resources/patch/append-only.ttl.acl +6 -0
- package/test/resources/patch/favicon.ico +0 -0
- package/test/resources/patch/favicon.ico.acl +15 -0
- package/test/resources/patch/index.html +0 -0
- package/test/resources/patch/read-append.ttl +2 -0
- package/test/resources/patch/read-append.ttl.acl +6 -0
- package/test/resources/patch/read-only.ttl +2 -0
- package/test/resources/patch/read-only.ttl.acl +6 -0
- package/test/resources/patch/read-write.ttl +2 -0
- package/test/resources/patch/read-write.ttl.acl +6 -0
- package/test/resources/patch/robots.txt +3 -0
- package/test/resources/patch/robots.txt.acl +15 -0
- package/test/resources/patch/write-only.ttl +2 -0
- package/test/resources/patch/write-only.ttl.acl +6 -0
- package/test/resources/patch-1-initial.ttl +3 -0
- package/test/resources/patch-2-final.ttl +2 -0
- package/test/resources/patch-2-initial.ttl +3 -0
- package/test/resources/patch-2.spatch +2 -0
- package/test/resources/patch-2n.spatch +2 -0
- package/test/resources/patch-3-final.ttl +28 -0
- package/test/resources/patch-4-final.ttl +29 -0
- package/test/resources/patch-5-final.ttl +1 -0
- package/test/resources/patch-5-initial.ttl +3 -0
- package/test/resources/patch-5.spatch +2 -0
- package/test/resources/put-input-2.html +13 -0
- package/test/resources/put-input.txt +6 -0
- package/test/resources/robots.txt +3 -0
- package/test/resources/robots.txt.acl +15 -0
- package/test/resources/sampleContainer/blank +0 -0
- package/test/resources/sampleContainer/cert.pkcs +0 -0
- package/test/resources/sampleContainer/example.ttl.old +1 -0
- package/test/resources/sampleContainer/example1.ttl +12 -0
- package/test/resources/sampleContainer/example2.ttl +3 -0
- package/test/resources/sampleContainer/example3.ttl +7 -0
- package/test/resources/sampleContainer/example4$.ttl +7 -0
- package/test/resources/sampleContainer/filename with spaces.txt +0 -0
- package/test/resources/sampleContainer/index.html +9 -0
- package/test/resources/sampleContainer/post2.ttl +6 -0
- package/test/resources/sampleContainer/put1.ttl +13 -0
- package/test/resources/sampleContainer/solid.png +0 -0
- package/test/resources/sampleContainer/user1.pfx +0 -0
- package/test/resources/sampleContainer/user2.pfx +0 -0
- package/test/resources/sampleContainer2/example1.ttl +10 -0
- package/test/resources/sampleContainer2/example2.ttl +7 -0
- package/test/resources/timbl.jpg +0 -0
- package/test/scenarios.md +23 -0
- package/test/surface/docker/cookie/Dockerfile +6 -0
- package/test/surface/docker/cookie/app/index.js +29 -0
- package/test/surface/docker/cookie/app/package-lock.json +13 -0
- package/test/surface/docker/cookie/app/package.json +14 -0
- package/test/surface/docker/server/Dockerfile +19 -0
- package/test/surface/docker/server/config/defaults.js +10 -0
- package/test/surface/docker/server/config/templates/emails/delete-account.js +49 -0
- package/test/surface/docker/server/config/templates/emails/invalid-username.js +30 -0
- package/test/surface/docker/server/config/templates/emails/reset-password.js +49 -0
- package/test/surface/docker/server/config/templates/emails/welcome.js +39 -0
- package/test/surface/docker/server/config/templates/new-account/favicon.ico +0 -0
- package/test/surface/docker/server/config/templates/new-account/favicon.ico.acl +26 -0
- package/test/surface/docker/server/config/templates/new-account/profile/card$.ttl +26 -0
- package/test/surface/docker/server/config/templates/new-account/robots.txt +3 -0
- package/test/surface/docker/server/config/templates/new-account/robots.txt.acl +26 -0
- package/test/surface/docker/server/config/templates/new-account/settings/prefs.ttl +15 -0
- package/test/surface/docker/server/config/templates/new-account/settings/privateTypeIndex.ttl +4 -0
- package/test/surface/docker/server/config/templates/new-account/settings/publicTypeIndex.ttl +4 -0
- package/test/surface/docker/server/config/templates/new-account/settings/publicTypeIndex.ttl.acl +25 -0
- package/test/surface/docker/server/config/templates/new-account/settings/serverSide.ttl.acl +13 -0
- package/test/surface/docker/server/config/templates/new-account/settings/serverSide.ttl.inactive +12 -0
- package/test/surface/docker/server/config/templates/server/favicon.ico +0 -0
- package/test/surface/docker/server/config/templates/server/favicon.ico.acl +15 -0
- package/test/surface/docker/server/config/templates/server/index.html +55 -0
- package/test/surface/docker/server/config/templates/server/robots.txt +3 -0
- package/test/surface/docker/server/config/templates/server/robots.txt.acl +15 -0
- package/test/surface/docker/server/config/usernames-blacklist.json +4 -0
- package/test/surface/docker/server/config/views/account/account-deleted.hbs +17 -0
- package/test/surface/docker/server/config/views/account/delete-confirm.hbs +51 -0
- package/test/surface/docker/server/config/views/account/delete-link-sent.hbs +17 -0
- package/test/surface/docker/server/config/views/account/delete.hbs +51 -0
- package/test/surface/docker/server/config/views/account/invalid-username.hbs +22 -0
- package/test/surface/docker/server/config/views/account/register-disabled.hbs +6 -0
- package/test/surface/docker/server/config/views/account/register-form.hbs +147 -0
- package/test/surface/docker/server/config/views/account/register.hbs +24 -0
- package/test/surface/docker/server/config/views/auth/auth-hidden-fields.hbs +8 -0
- package/test/surface/docker/server/config/views/auth/change-password.hbs +58 -0
- package/test/surface/docker/server/config/views/auth/goodbye.hbs +23 -0
- package/test/surface/docker/server/config/views/auth/login-required.hbs +34 -0
- package/test/surface/docker/server/config/views/auth/login-tls.hbs +11 -0
- package/test/surface/docker/server/config/views/auth/login-username-password.hbs +28 -0
- package/test/surface/docker/server/config/views/auth/login.hbs +55 -0
- package/test/surface/docker/server/config/views/auth/no-permission.hbs +29 -0
- package/test/surface/docker/server/config/views/auth/password-changed.hbs +27 -0
- package/test/surface/docker/server/config/views/auth/reset-link-sent.hbs +21 -0
- package/test/surface/docker/server/config/views/auth/reset-password.hbs +52 -0
- package/test/surface/docker/server/config/views/auth/sharing.hbs +49 -0
- package/test/surface/docker/server/config/views/shared/create-account.hbs +8 -0
- package/test/surface/docker/server/config/views/shared/error.hbs +5 -0
- package/test/surface/docker/server/config.json +22 -0
- package/test/surface/docker/server/data/favicon.ico +0 -0
- package/test/surface/docker/server/data/favicon.ico.acl +26 -0
- package/test/surface/docker/server/data/index.html +48 -0
- package/test/surface/docker/server/data/profile/card$.ttl +31 -0
- package/test/surface/docker/server/data/robots.txt +3 -0
- package/test/surface/docker/server/data/robots.txt.acl +26 -0
- package/test/surface/docker/server/data/settings/prefs.ttl +15 -0
- package/test/surface/docker/server/data/settings/privateTypeIndex.ttl +4 -0
- package/test/surface/docker/server/data/settings/publicTypeIndex.ttl +4 -0
- package/test/surface/docker/server/data/settings/publicTypeIndex.ttl.acl +25 -0
- package/test/surface/docker/server/data/settings/serverSide.ttl +0 -0
- package/test/surface/docker/server/data/settings/serverSide.ttl.acl +13 -0
- package/test/surface/docker/server/data/settings/serverSide.ttl.inactive +12 -0
- package/test/surface/docker/server/env.list +4 -0
- package/test/surface/docker/solid-crud/Dockerfile +4 -0
- package/test/surface/docker/web-access-control/Dockerfile +1 -0
- package/test/surface/docker/webid-provider/Dockerfile +1 -0
- package/test/surface/run-solid-test-suite.sh +75 -0
- package/test/surface/server-env.list +5 -0
- package/test/surface/solid-crud-tests-env.list +5 -0
- package/test/surface/thirdparty-config.json +23 -0
- package/test/surface/thirdparty-env.list +6 -0
- package/test/surface/web-access-control-tests-env.list +6 -0
- package/test/surface/webid-provider-tests-env.list +4 -0
- package/test/test-helpers.mjs +63 -0
- package/test/unit/account-manager-test.mjs +610 -0
- package/test/unit/account-template-test.mjs +59 -0
- package/test/unit/acl-checker-test.mjs +51 -0
- package/test/unit/add-cert-request-test.mjs +120 -0
- package/test/unit/auth-handlers-test.mjs +108 -0
- package/test/unit/auth-proxy-test.mjs +224 -0
- package/test/unit/auth-request-test.mjs +96 -0
- package/test/unit/authenticator-test.mjs +34 -0
- package/test/unit/blacklist-service-test.mjs +49 -0
- package/test/unit/create-account-request-test.mjs +306 -0
- package/test/unit/delete-account-confirm-request-test.mjs +234 -0
- package/test/unit/delete-account-request-test.mjs +180 -0
- package/test/unit/email-service-test.mjs +166 -0
- package/test/unit/email-welcome-test.mjs +81 -0
- package/test/unit/error-pages-test.mjs +100 -0
- package/test/unit/esm-imports.test.mjs +149 -0
- package/test/unit/force-user-test.mjs +73 -0
- package/test/unit/getAvailableUrl-test.mjs +30 -0
- package/test/unit/getTrustedOrigins-test.mjs +20 -0
- package/test/unit/login-request-test.mjs +246 -0
- package/test/unit/oidc-manager-test.mjs +50 -0
- package/test/unit/password-authenticator-test.mjs +125 -0
- package/test/unit/password-change-request-test.mjs +259 -0
- package/test/unit/password-reset-email-request-test.mjs +234 -0
- package/test/unit/resource-mapper-test.mjs +673 -0
- package/test/unit/solid-host-test.mjs +119 -0
- package/test/unit/tls-authenticator-test.mjs +174 -0
- package/test/unit/token-service-test.mjs +82 -0
- package/test/unit/user-account-test.mjs +38 -0
- package/test/unit/user-accounts-api-test.mjs +59 -0
- package/test/unit/user-utils-test.mjs +64 -0
- package/test/unit/utils-test.mjs +114 -0
- package/test/utils/index.mjs +167 -0
- package/test/utils.mjs +205 -0
- package/test/validate-turtle.mjs +43 -0
- package/.github/workflows/ci.yml +0 -113
- package/.nvmrc +0 -1
- package/.snyk +0 -35
- package/bin/lib/cli-utils.js +0 -85
- package/bin/lib/cli.js +0 -39
- package/bin/solid.js +0 -3
- package/default-templates/new-account/.acl +0 -26
- package/default-templates/new-account/.meta +0 -5
- package/default-templates/new-account/.well-known/.acl +0 -19
- package/default-templates/new-account/private/.acl +0 -10
- package/default-templates/new-account/profile/.acl +0 -19
- package/default-templates/new-account/public/.acl +0 -19
- package/default-templates/new-account/settings/.acl +0 -20
- package/index.js +0 -3
- package/lib/api/authn/index.js +0 -5
- package/lib/api/index.js +0 -6
- package/lib/common/template-utils.js +0 -50
- package/lib/debug.js +0 -18
- package/lib/ldp-copy.js +0 -73
- package/lib/ldp-middleware.js +0 -40
- package/lib/models/account-manager.js +0 -604
- package/lib/models/account-template.js +0 -156
- package/lib/models/authenticator.js +0 -337
- package/lib/models/oidc-manager.js +0 -53
- package/lib/models/solid-host.js +0 -131
- package/lib/models/user-account.js +0 -113
- package/lib/models/webid-tls-certificate.js +0 -184
- package/lib/requests/add-cert-request.js +0 -138
- package/lib/requests/auth-request.js +0 -234
- package/lib/requests/delete-account-confirm-request.js +0 -170
- package/lib/requests/login-request.js +0 -205
- package/lib/services/email-service.js +0 -162
- package/lib/webid/tls/index.js +0 -185
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
/* eslint-disable no-unused-expressions */
|
|
2
|
+
import supertest from 'supertest'
|
|
3
|
+
import rdf from 'rdflib'
|
|
4
|
+
import ldnode from '../../index.mjs'
|
|
5
|
+
import path from 'path'
|
|
6
|
+
import { fileURLToPath } from 'url'
|
|
7
|
+
import fs from 'fs-extra'
|
|
8
|
+
import { rm, read, checkDnsSettings, cleanDir } from '../utils/index.mjs'
|
|
9
|
+
|
|
10
|
+
const __filename = fileURLToPath(import.meta.url)
|
|
11
|
+
const __dirname = path.dirname(__filename)
|
|
12
|
+
const $rdf = rdf
|
|
13
|
+
|
|
14
|
+
// FIXME: #1502
|
|
15
|
+
describe('AccountManager (OIDC account creation tests)', function () {
|
|
16
|
+
const port = 7457
|
|
17
|
+
const serverUri = `https://localhost:${port}`
|
|
18
|
+
const host = `localhost:${port}`
|
|
19
|
+
const root = path.normalize(path.join(__dirname, '../resources/accounts/'))
|
|
20
|
+
const configPath = path.normalize(path.join(__dirname, '../resources/config'))
|
|
21
|
+
const dbPath = path.normalize(path.join(__dirname, '../resources/accounts/db'))
|
|
22
|
+
|
|
23
|
+
let ldpHttpsServer
|
|
24
|
+
|
|
25
|
+
const ldp = ldnode.createServer({
|
|
26
|
+
root,
|
|
27
|
+
configPath,
|
|
28
|
+
sslKey: path.normalize(path.join(__dirname, '../keys/key.pem')),
|
|
29
|
+
sslCert: path.normalize(path.join(__dirname, '../keys/cert.pem')),
|
|
30
|
+
auth: 'oidc',
|
|
31
|
+
webid: true,
|
|
32
|
+
multiuser: true,
|
|
33
|
+
strictOrigin: true,
|
|
34
|
+
dbPath,
|
|
35
|
+
serverUri,
|
|
36
|
+
enforceToc: true
|
|
37
|
+
})
|
|
38
|
+
|
|
39
|
+
before(checkDnsSettings)
|
|
40
|
+
|
|
41
|
+
before(function (done) {
|
|
42
|
+
ldpHttpsServer = ldp.listen(port, done)
|
|
43
|
+
})
|
|
44
|
+
|
|
45
|
+
after(function () {
|
|
46
|
+
if (ldpHttpsServer) ldpHttpsServer.close()
|
|
47
|
+
fs.removeSync(path.join(dbPath, 'oidc/users/users'))
|
|
48
|
+
cleanDir(path.join(root, 'localhost'))
|
|
49
|
+
})
|
|
50
|
+
|
|
51
|
+
const server = supertest(serverUri)
|
|
52
|
+
|
|
53
|
+
it('should expect a 404 on GET /accounts', function (done) {
|
|
54
|
+
server.get('/api/accounts')
|
|
55
|
+
.expect(404, done)
|
|
56
|
+
})
|
|
57
|
+
|
|
58
|
+
describe('accessing accounts', function () {
|
|
59
|
+
it('should be able to access public file of an account', function (done) {
|
|
60
|
+
const subdomain = supertest('https://tim.' + host)
|
|
61
|
+
subdomain.get('/hello.html')
|
|
62
|
+
.expect(200, done)
|
|
63
|
+
})
|
|
64
|
+
it('should get 404 if root does not exist', function (done) {
|
|
65
|
+
const subdomain = supertest('https://nicola.' + host)
|
|
66
|
+
subdomain.get('/')
|
|
67
|
+
.set('Accept', 'text/turtle')
|
|
68
|
+
.set('Origin', 'http://example.com')
|
|
69
|
+
.expect(404)
|
|
70
|
+
.expect('Access-Control-Allow-Origin', 'http://example.com')
|
|
71
|
+
.expect('Access-Control-Allow-Credentials', 'true')
|
|
72
|
+
.end(function (err, res) {
|
|
73
|
+
done(err)
|
|
74
|
+
})
|
|
75
|
+
})
|
|
76
|
+
})
|
|
77
|
+
|
|
78
|
+
describe('creating an account with POST', function () {
|
|
79
|
+
beforeEach(function () {
|
|
80
|
+
rm('accounts/nicola.localhost')
|
|
81
|
+
})
|
|
82
|
+
|
|
83
|
+
after(function () {
|
|
84
|
+
rm('accounts/nicola.localhost')
|
|
85
|
+
})
|
|
86
|
+
|
|
87
|
+
it('should not create WebID if no username is given', (done) => {
|
|
88
|
+
const subdomain = supertest('https://' + host)
|
|
89
|
+
subdomain.post('/api/accounts/new')
|
|
90
|
+
.send('username=&password=12345')
|
|
91
|
+
.expect(400, done)
|
|
92
|
+
})
|
|
93
|
+
|
|
94
|
+
it('should not create WebID if no password is given', (done) => {
|
|
95
|
+
const subdomain = supertest('https://' + host)
|
|
96
|
+
subdomain.post('/api/accounts/new')
|
|
97
|
+
.send('username=nicola&password=')
|
|
98
|
+
.expect(400, done)
|
|
99
|
+
})
|
|
100
|
+
|
|
101
|
+
it('should not create a WebID if it already exists', function (done) {
|
|
102
|
+
const subdomain = supertest('https://' + host)
|
|
103
|
+
subdomain.post('/api/accounts/new')
|
|
104
|
+
.send('username=nicola&password=12345&acceptToc=true')
|
|
105
|
+
.expect(302)
|
|
106
|
+
.end((err, res) => {
|
|
107
|
+
if (err) {
|
|
108
|
+
return done(err)
|
|
109
|
+
}
|
|
110
|
+
subdomain.post('/api/accounts/new')
|
|
111
|
+
.send('username=nicola&password=12345&acceptToc=true')
|
|
112
|
+
.expect(400)
|
|
113
|
+
.end((err) => {
|
|
114
|
+
done(err)
|
|
115
|
+
})
|
|
116
|
+
})
|
|
117
|
+
})
|
|
118
|
+
|
|
119
|
+
it('should not create WebID if T&C is not accepted', (done) => {
|
|
120
|
+
const subdomain = supertest('https://' + host)
|
|
121
|
+
subdomain.post('/api/accounts/new')
|
|
122
|
+
.send('username=nicola&password=12345&acceptToc=')
|
|
123
|
+
.expect(400, done)
|
|
124
|
+
})
|
|
125
|
+
|
|
126
|
+
it('should create the default folders', function (done) {
|
|
127
|
+
const subdomain = supertest('https://' + host)
|
|
128
|
+
subdomain.post('/api/accounts/new')
|
|
129
|
+
.send('username=nicola&password=12345&acceptToc=true')
|
|
130
|
+
.expect(302)
|
|
131
|
+
.end(function (err) {
|
|
132
|
+
if (err) {
|
|
133
|
+
return done(err)
|
|
134
|
+
}
|
|
135
|
+
const domain = host.split(':')[0]
|
|
136
|
+
const card = read(path.normalize(path.join('accounts/nicola.' + domain,
|
|
137
|
+
'profile/card$.ttl')))
|
|
138
|
+
const cardAcl = read(path.normalize(path.join('accounts/nicola.' + domain,
|
|
139
|
+
'profile/.acl')))
|
|
140
|
+
const prefs = read(path.normalize(path.join('accounts/nicola.' + domain,
|
|
141
|
+
'settings/prefs.ttl')))
|
|
142
|
+
const inboxAcl = read(path.normalize(path.join('accounts/nicola.' + domain,
|
|
143
|
+
'inbox/.acl')))
|
|
144
|
+
const rootMeta = read(path.normalize(path.join('accounts/nicola.' + domain, '.meta')))
|
|
145
|
+
const rootMetaAcl = read(path.normalize(path.join('accounts/nicola.' + domain,
|
|
146
|
+
'.meta.acl')))
|
|
147
|
+
|
|
148
|
+
if (domain && card && cardAcl && prefs && inboxAcl && rootMeta &&
|
|
149
|
+
rootMetaAcl) {
|
|
150
|
+
done()
|
|
151
|
+
} else {
|
|
152
|
+
done(new Error('failed to create default files'))
|
|
153
|
+
}
|
|
154
|
+
})
|
|
155
|
+
}).timeout(20000)
|
|
156
|
+
|
|
157
|
+
it('should link WebID to the root account', function (done) {
|
|
158
|
+
const domain = supertest('https://' + host)
|
|
159
|
+
domain.post('/api/accounts/new')
|
|
160
|
+
.send('username=nicola&password=12345&acceptToc=true')
|
|
161
|
+
.expect(302)
|
|
162
|
+
.end(function (err) {
|
|
163
|
+
if (err) {
|
|
164
|
+
return done(err)
|
|
165
|
+
}
|
|
166
|
+
const subdomain = supertest('https://nicola.' + host)
|
|
167
|
+
subdomain.get('/.meta')
|
|
168
|
+
.expect(200)
|
|
169
|
+
.end(function (err, data) {
|
|
170
|
+
if (err) {
|
|
171
|
+
return done(err)
|
|
172
|
+
}
|
|
173
|
+
const graph = $rdf.graph()
|
|
174
|
+
$rdf.parse(
|
|
175
|
+
data.text,
|
|
176
|
+
graph,
|
|
177
|
+
'https://nicola.' + host + '/.meta',
|
|
178
|
+
'text/turtle')
|
|
179
|
+
const statements = graph.statementsMatching(
|
|
180
|
+
undefined,
|
|
181
|
+
$rdf.sym('http://www.w3.org/ns/solid/terms#account'),
|
|
182
|
+
undefined)
|
|
183
|
+
if (statements.length === 1) {
|
|
184
|
+
done()
|
|
185
|
+
} else {
|
|
186
|
+
done(new Error('missing link to WebID of account'))
|
|
187
|
+
}
|
|
188
|
+
})
|
|
189
|
+
})
|
|
190
|
+
}).timeout(20000)
|
|
191
|
+
|
|
192
|
+
describe('after setting up account', () => {
|
|
193
|
+
beforeEach(done => {
|
|
194
|
+
const subdomain = supertest('https://' + host)
|
|
195
|
+
subdomain.post('/api/accounts/new')
|
|
196
|
+
.send('username=nicola&password=12345&acceptToc=true')
|
|
197
|
+
.end(done)
|
|
198
|
+
})
|
|
199
|
+
|
|
200
|
+
it('should create a private settings container', function (done) {
|
|
201
|
+
const subdomain = supertest('https://nicola.' + host)
|
|
202
|
+
subdomain.head('/settings/')
|
|
203
|
+
.expect(401)
|
|
204
|
+
.end(function (err) {
|
|
205
|
+
done(err)
|
|
206
|
+
})
|
|
207
|
+
})
|
|
208
|
+
|
|
209
|
+
it('should create a private prefs file in the settings container', function (done) {
|
|
210
|
+
const subdomain = supertest('https://nicola.' + host)
|
|
211
|
+
subdomain.head('/inbox/prefs.ttl')
|
|
212
|
+
.expect(401)
|
|
213
|
+
.end(function (err) {
|
|
214
|
+
done(err)
|
|
215
|
+
})
|
|
216
|
+
})
|
|
217
|
+
|
|
218
|
+
it('should create a private inbox container', function (done) {
|
|
219
|
+
const subdomain = supertest('https://nicola.' + host)
|
|
220
|
+
subdomain.head('/inbox/')
|
|
221
|
+
.expect(401)
|
|
222
|
+
.end(function (err) {
|
|
223
|
+
done(err)
|
|
224
|
+
})
|
|
225
|
+
})
|
|
226
|
+
})
|
|
227
|
+
})
|
|
228
|
+
})
|
|
229
|
+
|
|
230
|
+
// FIXME: #1502
|
|
231
|
+
describe('Single User signup page', () => {
|
|
232
|
+
const serverUri = 'https://localhost:7457'
|
|
233
|
+
const port = 7457
|
|
234
|
+
let ldpHttpsServer
|
|
235
|
+
rm('resources/accounts/single-user/')
|
|
236
|
+
const rootDir = path.normalize(path.join(__dirname, '../resources/accounts/single-user/'))
|
|
237
|
+
const configPath = path.normalize(path.join(__dirname, '../resources/config'))
|
|
238
|
+
const ldp = ldnode.createServer({
|
|
239
|
+
port,
|
|
240
|
+
root: rootDir,
|
|
241
|
+
configPath,
|
|
242
|
+
sslKey: path.normalize(path.join(__dirname, '../keys/key.pem')),
|
|
243
|
+
sslCert: path.normalize(path.join(__dirname, '../keys/cert.pem')),
|
|
244
|
+
webid: true,
|
|
245
|
+
multiuser: false,
|
|
246
|
+
strictOrigin: true
|
|
247
|
+
})
|
|
248
|
+
const server = supertest(serverUri)
|
|
249
|
+
|
|
250
|
+
before(function (done) {
|
|
251
|
+
ldpHttpsServer = ldp.listen(port, () => server.post('/api/accounts/new')
|
|
252
|
+
.send('username=foo&password=12345&acceptToc=true')
|
|
253
|
+
.end(done))
|
|
254
|
+
})
|
|
255
|
+
|
|
256
|
+
after(function () {
|
|
257
|
+
if (ldpHttpsServer) ldpHttpsServer.close()
|
|
258
|
+
fs.removeSync(rootDir)
|
|
259
|
+
})
|
|
260
|
+
|
|
261
|
+
it('should return a 406 not acceptable without accept text/html', done => {
|
|
262
|
+
server.get('/')
|
|
263
|
+
.set('accept', 'text/plain')
|
|
264
|
+
.expect(406)
|
|
265
|
+
.end(done)
|
|
266
|
+
})
|
|
267
|
+
})
|
|
268
|
+
|
|
269
|
+
// FIXME: #1502
|
|
270
|
+
describe('Signup page where Terms & Conditions are not being enforced', () => {
|
|
271
|
+
const port = 3457
|
|
272
|
+
const host = `localhost:${port}`
|
|
273
|
+
const root = path.normalize(path.join(__dirname, '../resources/accounts/'))
|
|
274
|
+
const configPath = path.normalize(path.join(__dirname, '../resources/config'))
|
|
275
|
+
const dbPath = path.normalize(path.join(__dirname, '../resources/accounts/db'))
|
|
276
|
+
const ldp = ldnode.createServer({
|
|
277
|
+
port,
|
|
278
|
+
root,
|
|
279
|
+
configPath,
|
|
280
|
+
sslKey: path.normalize(path.join(__dirname, '../keys/key.pem')),
|
|
281
|
+
sslCert: path.normalize(path.join(__dirname, '../keys/cert.pem')),
|
|
282
|
+
auth: 'oidc',
|
|
283
|
+
webid: true,
|
|
284
|
+
multiuser: true,
|
|
285
|
+
strictOrigin: true,
|
|
286
|
+
enforceToc: false
|
|
287
|
+
})
|
|
288
|
+
let ldpHttpsServer
|
|
289
|
+
|
|
290
|
+
before(function (done) {
|
|
291
|
+
ldpHttpsServer = ldp.listen(port, done)
|
|
292
|
+
})
|
|
293
|
+
|
|
294
|
+
after(function () {
|
|
295
|
+
if (ldpHttpsServer) ldpHttpsServer.close()
|
|
296
|
+
fs.removeSync(path.join(dbPath, 'oidc/users/users'))
|
|
297
|
+
cleanDir(path.join(root, 'localhost'))
|
|
298
|
+
rm('accounts/nicola.localhost')
|
|
299
|
+
})
|
|
300
|
+
|
|
301
|
+
beforeEach(function () {
|
|
302
|
+
rm('accounts/nicola.localhost')
|
|
303
|
+
})
|
|
304
|
+
|
|
305
|
+
it('should not enforce T&C upon creating account', function (done) {
|
|
306
|
+
const subdomain = supertest('https://' + host)
|
|
307
|
+
subdomain.post('/api/accounts/new')
|
|
308
|
+
.send('username=nicola&password=12345')
|
|
309
|
+
.expect(302, done)
|
|
310
|
+
})
|
|
311
|
+
})
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
-----BEGIN CERTIFICATE-----
|
|
2
|
+
MIIDiTCCAnGgAwIBAgIJALcFbDEc4HZSMA0GCSqGSIb3DQEBBQUAMFsxCzAJBgNV
|
|
3
|
+
BAYTAlVTMRMwEQYDVQQIDApTb21lLVN0YXRlMSEwHwYDVQQKDBhJbnRlcm5ldCBX
|
|
4
|
+
aWRnaXRzIFB0eSBMdGQxFDASBgNVBAMMCyoubG9jYWxob3N0MB4XDTE2MDExMDAy
|
|
5
|
+
Mj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XwKBgAQO
|
|
22
|
+
4WKj7tUtf/S4QqrjdlCewutDsdr5v/WWAT9RzaKseF90tcQFEm8xfEtkBqbsC2x0
|
|
23
|
+
CBYd6oEH1QUpLFVA+7XzBtp6I+wcRoE40LuHBo5V6MXHPGwtptsHNpbYd9ec0RIc
|
|
24
|
+
hGU1Ze35kXNH587H6kiGcKQ4D2Mkv3U0u/oeyNyBAoGAfUJI8H63XOar6TXs0Ug4
|
|
25
|
+
IW34WrdC8BM4cz342rXKusS6+o15wnI8kAyVkSEx54W/cK5QaIUIQNGia74UlGhq
|
|
26
|
+
wqGyBxn3ahZPZhu0eOE2PHIDcxS+09d87bNjpUjMcysORJV2u9klyVMc5ornV6aO
|
|
27
|
+
cpKHUgbAsaKX3NgPiLrgxFQ=
|
|
28
|
+
-----END PRIVATE KEY-----
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
Bag Attributes
|
|
2
|
+
friendlyName: user2 [on user2.databox.me]'s WebID ID
|
|
3
|
+
localKeyID: A4 46 1F 69 0A FB 44 4A 65 49 A9 4E 01 AC ED 57 98 90 97 37
|
|
4
|
+
subject=/O=WebID/CN=user2 [on user2.databox.me]
|
|
5
|
+
issuer=/O=WebID/CN=user2 [on user2.databox.me]
|
|
6
|
+
-----BEGIN CERTIFICATE-----
|
|
7
|
+
MIIC6TCCAlSgAwIBAgIBKjALBgkqhkiG9w0BAQswNjEOMAwGA1UEChMFV2ViSUQx
|
|
8
|
+
JDAiBgNVBAMMG3VzZXIyIFtvbiB1c2VyMi5kYXRhYm94Lm1lXTAeFw0wMDAxMDEw
|
|
9
|
+
MDAwMDBaFw00OTEyMzEyMzU5NTlaMDYxDjAMBgNVBAoTBVdlYklEMSQwIgYDVQQD
|
|
10
|
+
DBt1c2VyMiBbb24gdXNlcjIuZGF0YWJveC5tZV0wggEiMA0GCSqGSIb3DQEBAQUA
|
|
11
|
+
A4IBDwAwggEKAoIBAQDLOMg2TuQ7Hb9JxQaaDwJmEKE8YNiLN1F0vA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HahVahPyUCgYEAnufOLgCwNlochgiR1TGq
|
|
19
|
+
8ksF12S2z7bJo+t8NU2Z9p+S6pM7sse12ZrIx1YfjqftkEsm959tp9Um8vqhVSMu
|
|
20
|
+
iomGQjLrbvxbFL8AWOevclv/wfjF1ZnhKsZe2NkwS6shJ3OEwxIDgksYUKRyYAtF
|
|
21
|
+
Rv5HqGQIa3tR+Muuo76kFIUCgYBG1G513fr2vY5ZIyfJtKrn64BAawn770BbbrgA
|
|
22
|
+
VJfeQoWVxOLA/j9Gi+sbZyWHIK3MiTnhMd693lLc5y90EHkD6KMPFX7UzWmjvtDJ
|
|
23
|
+
0sjc8SmO16b3bGRb1/CfuqYVSe+poQzSTUUznQZK1XcU8EHwfNCdcVX5MtWQejHJ
|
|
24
|
+
bJOz+QKBgDeqWqeOyNjvKKdBNvMUfmD0synqloshBsEOV8NM7YEdiiKsz4azIFQ/
|
|
25
|
+
C9OehEM/dLCUYYtIploGfnQC59gFmWNf+Hlptlymsdo00kEYBo8uYV1hgTSrid11
|
|
26
|
+
bcmmq8lp9j6JntmR0AND1VEXXxvLSnJv3jXK2LcW45lRDMs7zWVi
|
|
27
|
+
-----END RSA PRIVATE KEY-----
|
package/test/mocha.opts
ADDED
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
# Run tests on node server
|
|
2
|
+
#
|
|
3
|
+
# First do make run-for-test
|
|
4
|
+
# in parent directory.
|
|
5
|
+
|
|
6
|
+
T=http://localhost:3456/test
|
|
7
|
+
W=/devel/WWW
|
|
8
|
+
S=$W/2000/10/swap
|
|
9
|
+
C=python $S/cwm.py --quiet
|
|
10
|
+
D=python $S/cant.py
|
|
11
|
+
|
|
12
|
+
all: get-1 put-1 put-2 post-1 post-2 post-2n post-3 post-4 post-5 delete-1
|
|
13
|
+
|
|
14
|
+
clean :
|
|
15
|
+
rm *result* *headers.txt *.nt || echo Never mind
|
|
16
|
+
|
|
17
|
+
ws-1 :
|
|
18
|
+
curl -v -i -N -H "Connection: Upgrade" -H "Upgrade: websocket" \
|
|
19
|
+
-H "Host: localhost:3333" -H "Origin: http://localhost:3333" $T/patch-1-initial.ttl,changes
|
|
20
|
+
get-1 :
|
|
21
|
+
curl --dump-header get-1-headers.txt $T/patch-1-initial.ttl > get-1-result.ttl
|
|
22
|
+
diff patch-1-initial.ttl get-1-result.ttl
|
|
23
|
+
# grep -i updates-via get-1-headers.txt
|
|
24
|
+
|
|
25
|
+
put-1 :
|
|
26
|
+
curl --upload-file put-input.txt $T/put-result.txt
|
|
27
|
+
diff put-input.txt put-result.txt
|
|
28
|
+
|
|
29
|
+
put-2 :
|
|
30
|
+
curl --upload-file put-input-2.html $T/put-result-2.html
|
|
31
|
+
diff put-input-2.html put-result-2.html
|
|
32
|
+
|
|
33
|
+
# try an empty patch file -- nothing should change
|
|
34
|
+
post-1:
|
|
35
|
+
cp patch-1-initial.ttl post-1-result.ttl
|
|
36
|
+
curl -HContent-type:application/sparql-update --data-binary @empty.spatch $T/post-1-result.ttl
|
|
37
|
+
# diff post-1-result.ttl patch-1-initial.ttl
|
|
38
|
+
$C --n3 --ntriples < post-1-result.ttl > post-1-result.nt
|
|
39
|
+
$C --n3 --ntriples < patch-1-initial.ttl > patch-1-final.nt
|
|
40
|
+
$D --from=patch-1-final.nt --diff=post-1-result.nt
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
#patch-2:
|
|
44
|
+
# cp patch-2-initial.ttl patch-2-result.ttl
|
|
45
|
+
# curl --request PATCH -HContent-type:application/sparql-update --data-binary @patch-2.spatch $T/patch-2-result.ttl
|
|
46
|
+
# diff patch-2-final.ttl patch-2-result.ttl
|
|
47
|
+
|
|
48
|
+
post-2n: # Negative test
|
|
49
|
+
cp patch-2-initial.ttl post-2n-result.ttl
|
|
50
|
+
curl --request POST -HContent-type:application/sparql-update --data-binary @patch-2n.spatch \
|
|
51
|
+
--dump-header post-2n-headers.txt $T/post-2n-result.ttl
|
|
52
|
+
# diff patch-2-final.ttl post-2-result.ttl
|
|
53
|
+
$C --n3 --ntriples < post-2n-result.ttl > post-2n-result.nt
|
|
54
|
+
$C --n3 --ntriples < patch-2-initial.ttl > patch-2n-final.nt # unchanged!
|
|
55
|
+
$D --from=patch-2n-final.nt --diff=post-2n-result.nt
|
|
56
|
+
grep 409 post-2n-headers.txt
|
|
57
|
+
|
|
58
|
+
post-2:
|
|
59
|
+
cp patch-2-initial.ttl post-2-result.ttl
|
|
60
|
+
curl --request POST -HContent-type:application/sparql-update --data-binary @patch-2.spatch \
|
|
61
|
+
--dump-header post-2-headers.txt $T/post-2-result.ttl
|
|
62
|
+
# diff patch-2-final.ttl post-2-result.ttl
|
|
63
|
+
$C --n3 --ntriples < post-2-result.ttl > post-2-result.nt
|
|
64
|
+
$C --n3 --ntriples < patch-2-final.ttl > patch-2-final.nt
|
|
65
|
+
$D --from=patch-2-final.nt --diff=post-2-result.nt
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
################### LDPATCH example
|
|
69
|
+
|
|
70
|
+
post-3:
|
|
71
|
+
cp ldpatch-example-initial.ttl post-3-result.ttl
|
|
72
|
+
curl -HContent-type:application/sparql-update --data-binary @ldpatch-example-patch-1.spatch \
|
|
73
|
+
--dump-header post-3-headers.txt $T/post-3-result.ttl
|
|
74
|
+
# patch-3-final.ttl post-3-result.ttl
|
|
75
|
+
$C --n3 --ntriples < post-3-result.ttl > post-3-result.nt
|
|
76
|
+
$C --n3 --ntriples < patch-3-final.ttl > patch-3-final.nt
|
|
77
|
+
$D --from=patch-3-final.nt --diff=post-3-result.nt
|
|
78
|
+
|
|
79
|
+
post-4:
|
|
80
|
+
cp ldpatch-example-initial.ttl post-4-result.ttl
|
|
81
|
+
curl -HContent-type:application/sparql-update --data-binary @ldpatch-example-patch-2.spatch \
|
|
82
|
+
--dump-header post-4-headers.txt $T/post-4-result.ttl
|
|
83
|
+
# diff patch-4-final.ttl post-4-result.ttl
|
|
84
|
+
$C --n3 --ntriples < post-4-result.ttl > post-4-result.nt
|
|
85
|
+
$C --n3 --ntriples < patch-4-final.ttl > patch-4-final.nt
|
|
86
|
+
$D --from=patch-4-final.nt --diff=post-4-result.nt
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
####### "DELETE DATA" in patch
|
|
90
|
+
|
|
91
|
+
post-5:
|
|
92
|
+
cp patch-5-initial.ttl post-5-result.ttl
|
|
93
|
+
curl -HContent-type:application/sparql-update --data-binary @patch-5.spatch \
|
|
94
|
+
--dump-header post-5-headers.txt $T/post-5-result.ttl
|
|
95
|
+
# diff patch-4-final.ttl post-4-result.ttl
|
|
96
|
+
$C --n3 --ntriples < post-5-result.ttl > post-5-result.nt
|
|
97
|
+
$C --n3 --ntriples < patch-5-final.ttl > patch-5-final.nt
|
|
98
|
+
$D --from=patch-5-final.nt --diff=post-5-result.nt
|
|
99
|
+
|
|
100
|
+
###### DELETE method
|
|
101
|
+
|
|
102
|
+
delete-1:
|
|
103
|
+
cp patch-5-initial.ttl del-1-result.ttl
|
|
104
|
+
curl --request DELETE \
|
|
105
|
+
--dump-header del-1-headers.txt $T/del-1-result.ttl
|
|
106
|
+
echo Ignore_this_file > del-1-result.txt
|
|
107
|
+
|
|
108
|
+
#### Link-following Sparql
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
lfs-0:
|
|
112
|
+
curl http://www.w3.org/2015/02/lf-sparql/example1/q0.sparql > lfs-0.sparql
|
|
113
|
+
curl http://www.w3.org/2015/02/lf-sparql/example1/alice > lfs-1-target.ttl
|
|
114
|
+
curl -HContent-type:application/sparql --data-binary @lfs-0.sparql \
|
|
115
|
+
--dump-header lfs-1-headers.txt $T/lfs-1-target.ttl > lfs-0-result.json
|
|
116
|
+
diff lfs-0-result.json lfs-0-final.json
|
|
117
|
+
|
|
118
|
+
lfs-1:
|
|
119
|
+
curl http://www.w3.org/2015/02/lf-sparql/example1/q1.sparql > lfs-1.sparql
|
|
120
|
+
curl http://www.w3.org/2015/02/lf-sparql/example1/alice > lfs-1-target.ttl
|
|
121
|
+
curl -HContent-type:application/sparql --data-binary @lfs-1.sparql \
|
|
122
|
+
--dump-header lfs-1-headers.txt $T/lfs-1-target.ttl > lfs-1-result.json
|
|
123
|
+
diff lfs-1-result.json lfs-1-final.json
|
|
124
|
+
|
|
125
|
+
######### Live update
|
|
126
|
+
|
|
127
|
+
live-2:
|
|
128
|
+
./live-2.bash
|
|
129
|
+
mv live-2-result.n3 live-2-saved-result.n3
|
|
130
|
+
$C live-2-saved-result.n3 --no
|
|
131
|
+
grep insert live-2-saved-result.n3
|
|
132
|
+
grep logged live-2-saved-result.n3
|
|
133
|
+
|
|
134
|
+
# curl http://localhost:3456/test/post-1-result.ttl,changes > live-2-result.n3 &
|
|
135
|
+
# cp patch-2-initial.ttl post-2-result.ttl
|
|
136
|
+
# curl --request POST -HContent-type:application/sparql-update --data-binary @patch-2.spatch \
|
|
137
|
+
# --dump-header post-2-headers.txt $T/post-2-result.ttl
|
|
138
|
+
# $C --n3 --ntriples < post-2-result.ttl > post-2-result.nt
|
|
139
|
+
# $C --n3 --ntriples < patch-2-final.ttl > patch-2-final.nt
|
|
140
|
+
# $D --from=patch-2-final.nt --diff=post-2-result.nt
|
|
141
|
+
# sleep 1
|
|
142
|
+
# mv live-2-result.n3 live-2-saved-result.n3
|
|
143
|
+
# $C live-2-saved-result.n3 --no
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"redirect_uris":["https://localhost:3457/api/oidc/rp/https%3A%2F%2Flocalhost%3A3457"],"client_id":"5319f8e8e4ea3214c2e92b252520d355","client_secret":"b6af582c2fc6ef6aeda6d1a208a0e4aa","response_types":["code","id_token token","code id_token token"],"grant_types":["authorization_code","implicit","refresh_token","client_credentials"],"application_type":"web","client_name":"Solid OIDC RP for https://localhost:3457","id_token_signed_response_alg":"RS256","token_endpoint_auth_method":"client_secret_basic","default_max_age":86400,"post_logout_redirect_uris":["https://localhost:3457/goodbye"]}
|