javascript-solid-server 0.0.13 → 0.0.16

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 (49) hide show
  1. package/.claude/settings.local.json +27 -1
  2. package/CTH.md +222 -0
  3. package/README.md +92 -3
  4. package/bin/jss.js +11 -1
  5. package/cth-config/application.yaml +2 -0
  6. package/cth-config/jss.ttl +6 -0
  7. package/cth-config/test-subjects.ttl +14 -0
  8. package/cth.env +19 -0
  9. package/package.json +1 -1
  10. package/scripts/test-cth-compat.js +3 -2
  11. package/src/auth/middleware.js +17 -7
  12. package/src/auth/token.js +44 -1
  13. package/src/config.js +7 -0
  14. package/src/handlers/container.js +49 -16
  15. package/src/handlers/resource.js +99 -32
  16. package/src/idp/accounts.js +11 -2
  17. package/src/idp/credentials.js +38 -38
  18. package/src/idp/index.js +112 -21
  19. package/src/idp/interactions.js +123 -11
  20. package/src/idp/provider.js +68 -2
  21. package/src/rdf/turtle.js +15 -2
  22. package/src/server.js +24 -0
  23. package/src/utils/url.js +52 -0
  24. package/src/wac/parser.js +43 -1
  25. package/test/idp.test.js +17 -14
  26. package/test/ldp.test.js +10 -5
  27. package/test-data-idp-accounts/.idp/accounts/3c1cd503-1d7f-4ba0-a3af-ebedf519594d.json +9 -0
  28. package/test-data-idp-accounts/.idp/accounts/_email_index.json +3 -0
  29. package/test-data-idp-accounts/.idp/accounts/_webid_index.json +3 -0
  30. package/test-data-idp-accounts/.idp/keys/jwks.json +22 -0
  31. package/test-dpop-flow.js +148 -0
  32. package/test-subjects.ttl +21 -0
  33. package/data/alice/.acl +0 -50
  34. package/data/alice/inbox/.acl +0 -50
  35. package/data/alice/index.html +0 -80
  36. package/data/alice/private/.acl +0 -32
  37. package/data/alice/public/test.json +0 -1
  38. package/data/alice/settings/.acl +0 -32
  39. package/data/alice/settings/prefs +0 -17
  40. package/data/alice/settings/privateTypeIndex +0 -7
  41. package/data/alice/settings/publicTypeIndex +0 -7
  42. package/data/bob/.acl +0 -50
  43. package/data/bob/inbox/.acl +0 -50
  44. package/data/bob/index.html +0 -80
  45. package/data/bob/private/.acl +0 -32
  46. package/data/bob/settings/.acl +0 -32
  47. package/data/bob/settings/prefs +0 -17
  48. package/data/bob/settings/privateTypeIndex +0 -7
  49. package/data/bob/settings/publicTypeIndex +0 -7
@@ -1,50 +0,0 @@
1
- {
2
- "@context": {
3
- "acl": "http://www.w3.org/ns/auth/acl#",
4
- "foaf": "http://xmlns.com/foaf/0.1/"
5
- },
6
- "@graph": [
7
- {
8
- "@id": "#owner",
9
- "@type": "acl:Authorization",
10
- "acl:agent": {
11
- "@id": "http://localhost:3457/bob/#me"
12
- },
13
- "acl:accessTo": {
14
- "@id": "http://localhost:3457/bob/inbox/"
15
- },
16
- "acl:default": {
17
- "@id": "http://localhost:3457/bob/inbox/"
18
- },
19
- "acl:mode": [
20
- {
21
- "@id": "acl:Read"
22
- },
23
- {
24
- "@id": "acl:Write"
25
- },
26
- {
27
- "@id": "acl:Control"
28
- }
29
- ]
30
- },
31
- {
32
- "@id": "#public",
33
- "@type": "acl:Authorization",
34
- "acl:agentClass": {
35
- "@id": "foaf:Agent"
36
- },
37
- "acl:accessTo": {
38
- "@id": "http://localhost:3457/bob/inbox/"
39
- },
40
- "acl:default": {
41
- "@id": "http://localhost:3457/bob/inbox/"
42
- },
43
- "acl:mode": [
44
- {
45
- "@id": "acl:Append"
46
- }
47
- ]
48
- }
49
- ]
50
- }
@@ -1,80 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="utf-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1">
6
- <title>bob's Profile</title>
7
- <script type="application/ld+json">
8
- {
9
- "@context": {
10
- "foaf": "http://xmlns.com/foaf/0.1/",
11
- "solid": "http://www.w3.org/ns/solid/terms#",
12
- "schema": "http://schema.org/",
13
- "pim": "http://www.w3.org/ns/pim/space#",
14
- "ldp": "http://www.w3.org/ns/ldp#",
15
- "inbox": {
16
- "@id": "ldp:inbox",
17
- "@type": "@id"
18
- },
19
- "storage": {
20
- "@id": "pim:storage",
21
- "@type": "@id"
22
- },
23
- "oidcIssuer": {
24
- "@id": "solid:oidcIssuer",
25
- "@type": "@id"
26
- },
27
- "preferencesFile": {
28
- "@id": "pim:preferencesFile",
29
- "@type": "@id"
30
- }
31
- },
32
- "@graph": [
33
- {
34
- "@id": "http://localhost:3457/bob/",
35
- "@type": "foaf:PersonalProfileDocument",
36
- "foaf:maker": {
37
- "@id": "http://localhost:3457/bob/#me"
38
- },
39
- "foaf:primaryTopic": {
40
- "@id": "http://localhost:3457/bob/#me"
41
- }
42
- },
43
- {
44
- "@id": "http://localhost:3457/bob/#me",
45
- "@type": [
46
- "foaf:Person",
47
- "schema:Person"
48
- ],
49
- "foaf:name": "bob",
50
- "inbox": "http://localhost:3457/bob/inbox/",
51
- "storage": "http://localhost:3457/bob/",
52
- "oidcIssuer": "http://localhost:3457",
53
- "preferencesFile": "http://localhost:3457/bob/settings/prefs"
54
- }
55
- ]
56
- }
57
- </script>
58
- <style>
59
- body { font-family: system-ui, sans-serif; max-width: 600px; margin: 2rem auto; padding: 0 1rem; }
60
- h1 { color: #333; }
61
- .card { background: #f5f5f5; padding: 1.5rem; border-radius: 8px; }
62
- dt { font-weight: bold; margin-top: 1rem; }
63
- dd { margin-left: 0; color: #666; }
64
- a { color: #7c4dff; }
65
- </style>
66
- </head>
67
- <body>
68
- <div class="card">
69
- <h1>bob</h1>
70
- <dl>
71
- <dt>WebID</dt>
72
- <dd><a href="http://localhost:3457/bob/#me">http://localhost:3457/bob/#me</a></dd>
73
- <dt>Storage</dt>
74
- <dd><a href="http://localhost:3457/bob/">http://localhost:3457/bob/</a></dd>
75
- <dt>Inbox</dt>
76
- <dd><a href="http://localhost:3457/bob/inbox/">http://localhost:3457/bob/inbox/</a></dd>
77
- </dl>
78
- </div>
79
- </body>
80
- </html>
@@ -1,32 +0,0 @@
1
- {
2
- "@context": {
3
- "acl": "http://www.w3.org/ns/auth/acl#",
4
- "foaf": "http://xmlns.com/foaf/0.1/"
5
- },
6
- "@graph": [
7
- {
8
- "@id": "#owner",
9
- "@type": "acl:Authorization",
10
- "acl:agent": {
11
- "@id": "http://localhost:3457/bob/#me"
12
- },
13
- "acl:accessTo": {
14
- "@id": "http://localhost:3457/bob/private/"
15
- },
16
- "acl:mode": [
17
- {
18
- "@id": "acl:Read"
19
- },
20
- {
21
- "@id": "acl:Write"
22
- },
23
- {
24
- "@id": "acl:Control"
25
- }
26
- ],
27
- "acl:default": {
28
- "@id": "http://localhost:3457/bob/private/"
29
- }
30
- }
31
- ]
32
- }
@@ -1,32 +0,0 @@
1
- {
2
- "@context": {
3
- "acl": "http://www.w3.org/ns/auth/acl#",
4
- "foaf": "http://xmlns.com/foaf/0.1/"
5
- },
6
- "@graph": [
7
- {
8
- "@id": "#owner",
9
- "@type": "acl:Authorization",
10
- "acl:agent": {
11
- "@id": "http://localhost:3457/bob/#me"
12
- },
13
- "acl:accessTo": {
14
- "@id": "http://localhost:3457/bob/settings/"
15
- },
16
- "acl:mode": [
17
- {
18
- "@id": "acl:Read"
19
- },
20
- {
21
- "@id": "acl:Write"
22
- },
23
- {
24
- "@id": "acl:Control"
25
- }
26
- ],
27
- "acl:default": {
28
- "@id": "http://localhost:3457/bob/settings/"
29
- }
30
- }
31
- ]
32
- }
@@ -1,17 +0,0 @@
1
- {
2
- "@context": {
3
- "solid": "http://www.w3.org/ns/solid/terms#",
4
- "pim": "http://www.w3.org/ns/pim/space#",
5
- "publicTypeIndex": {
6
- "@id": "solid:publicTypeIndex",
7
- "@type": "@id"
8
- },
9
- "privateTypeIndex": {
10
- "@id": "solid:privateTypeIndex",
11
- "@type": "@id"
12
- }
13
- },
14
- "@id": "http://localhost:3457/bob/settings/prefs",
15
- "publicTypeIndex": "http://localhost:3457/bob/settings/publicTypeIndex",
16
- "privateTypeIndex": "http://localhost:3457/bob/settings/privateTypeIndex"
17
- }
@@ -1,7 +0,0 @@
1
- {
2
- "@context": {
3
- "solid": "http://www.w3.org/ns/solid/terms#"
4
- },
5
- "@id": "http://localhost:3457/bob/settings/privateTypeIndex",
6
- "@type": "solid:TypeIndex"
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "@context": {
3
- "solid": "http://www.w3.org/ns/solid/terms#"
4
- },
5
- "@id": "http://localhost:3457/bob/settings/publicTypeIndex",
6
- "@type": "solid:TypeIndex"
7
- }