javascript-solid-server 0.0.17 → 0.0.18
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/.claude/settings.local.json +5 -1
- package/data/.idp/accounts/_email_index.json +3 -0
- package/data/.idp/accounts/_webid_index.json +3 -0
- package/data/.idp/accounts/be4cfcd3-f6dd-41de-b2f5-7e4045d3e78c.json +9 -0
- package/data/.idp/authorization_code/6MiwPzYssbmBMdZ0_yp9RUmeGKJpmChhcPNAT-xkwE1.json +18 -0
- package/data/.idp/authorization_code/eC1ZBx2mpNsr0OjKMKdkKK69E4EfKV1SwU8p0dWFQTj.json +18 -0
- package/data/.idp/authorization_code/puWy-HQtx9ONFDhm_Bv-sRcBfm3OQPppRalQ956hLR4.json +18 -0
- package/data/.idp/client/client_mjocmpsj_vdrkczw9.json +25 -0
- package/data/.idp/client/client_mjocnc8k_3sd1aoa6.json +25 -0
- package/data/.idp/client/client_mjocnlbf_dkm0ltze.json +25 -0
- package/data/.idp/grant/ImpM7BIsyKuhvme7UOctBmRUicTsZweHOrHk95wza0s.json +16 -0
- package/data/.idp/grant/R2aOui_2A-m6E_aeq_03IyMd6N5OrFJ-lT67cCTuzOL.json +16 -0
- package/data/.idp/grant/YFxdDUi4neEPXjx_riL4_Tyg_VXuyhax_qm9yFEvrWG.json +16 -0
- package/data/.idp/grant/k5rDpXSPbMMzYLaWILONhIojmzNP6f1hkWxajC_weW3.json +16 -0
- package/data/.idp/grant/luO7y4I33a7yWi1BnfgOtoNcr1-5vH8l3t-aIqG8IgI.json +16 -0
- package/data/.idp/grant/nkXTstzTTyrUEN5H0f8Q-YR5jMqk0WdDc6H6H1XD6lJ.json +16 -0
- package/data/.idp/registration_access_token/CPhAs33MGp8s-gCRvdnbqjdDDdi0g9vNwacfuLGhX6L.json +7 -0
- package/data/.idp/registration_access_token/dbOnxWLEW5O2_pYEfCFQJYbvpdqJJ_t35gr1dd7jC_6.json +7 -0
- package/data/.idp/registration_access_token/lAFc6diCNs1g9KLYHRD75O-cH5uv4dRX09HPIelMZbE.json +7 -0
- package/data/.idp/session/VXgvz6cHkuwDGG3Hp7CYWzck4AlTDH9qCOnCxVVAGOb.json +28 -0
- package/data/demo/.acl +47 -0
- package/data/demo/inbox/.acl +50 -0
- package/data/demo/index.html +80 -0
- package/data/demo/private/.acl +32 -0
- package/data/demo/public/.acl +50 -0
- package/data/demo/public/card.ttl +8 -0
- package/data/demo/settings/.acl +32 -0
- package/data/demo/settings/prefs +17 -0
- package/data/demo/settings/privateTypeIndex +7 -0
- package/data/demo/settings/publicTypeIndex +7 -0
- package/package.json +1 -1
- package/src/idp/interactions.js +13 -12
- package/src/utils/url.js +18 -2
- package/test-data-idp-accounts/.idp/accounts/_email_index.json +1 -1
- package/test-data-idp-accounts/.idp/accounts/_webid_index.json +1 -1
- package/test-data-idp-accounts/.idp/accounts/b49949d9-6d61-45a1-bcee-07295aa07579.json +9 -0
- package/test-data-idp-accounts/.idp/keys/jwks.json +8 -8
- package/test-data-idp-accounts/.idp/accounts/ea61c611-2dda-41b8-8787-c6a22c5f33cc.json +0 -9
|
@@ -55,7 +55,11 @@
|
|
|
55
55
|
"WebFetch(domain:communitysolidserver.github.io)",
|
|
56
56
|
"WebFetch(domain:solidos.github.io)",
|
|
57
57
|
"WebFetch(domain:solidcommunity.net)",
|
|
58
|
-
"WebFetch(domain:www.npmjs.com)"
|
|
58
|
+
"WebFetch(domain:www.npmjs.com)",
|
|
59
|
+
"Bash(pm2 list:*)",
|
|
60
|
+
"Bash(pm2 logs:*)",
|
|
61
|
+
"Bash(pm2 restart:*)",
|
|
62
|
+
"Bash(timeout 60 npm test:*)"
|
|
59
63
|
]
|
|
60
64
|
}
|
|
61
65
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "be4cfcd3-f6dd-41de-b2f5-7e4045d3e78c",
|
|
3
|
+
"email": "demo@example.com",
|
|
4
|
+
"passwordHash": "$2b$10$oNs/bKRsayWfBVgQBmjgEeyo0vt65Borrwhru3huSbA6.U9TyBerq",
|
|
5
|
+
"webId": "http://localhost:4000/demo/#me",
|
|
6
|
+
"podName": "demo",
|
|
7
|
+
"createdAt": "2025-12-27T13:40:57.822Z",
|
|
8
|
+
"lastLogin": "2025-12-27T13:41:20.530Z"
|
|
9
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"iat": 1766842885,
|
|
3
|
+
"exp": 1766843485,
|
|
4
|
+
"accountId": "be4cfcd3-f6dd-41de-b2f5-7e4045d3e78c",
|
|
5
|
+
"authTime": 1766842885,
|
|
6
|
+
"codeChallenge": "lFETalcnuAuriGuAQvsKeZcYVW-pRv-Hz5MTPXDj7r0",
|
|
7
|
+
"codeChallengeMethod": "S256",
|
|
8
|
+
"grantId": "ImpM7BIsyKuhvme7UOctBmRUicTsZweHOrHk95wza0s",
|
|
9
|
+
"redirectUri": "http://localhost:4000/demo/public/card.ttl",
|
|
10
|
+
"resource": "urn:solid",
|
|
11
|
+
"scope": "openid offline_access webid",
|
|
12
|
+
"sessionUid": "4uEOfXb2Z3tCyhmDQuG53CpYdqkNf2FfaejZWA-xnqf",
|
|
13
|
+
"kind": "AuthorizationCode",
|
|
14
|
+
"jti": "6MiwPzYssbmBMdZ0_yp9RUmeGKJpmChhcPNAT-xkwE1",
|
|
15
|
+
"clientId": "client_mjocmpsj_vdrkczw9",
|
|
16
|
+
"_id": "6MiwPzYssbmBMdZ0_yp9RUmeGKJpmChhcPNAT-xkwE1",
|
|
17
|
+
"_expiresAt": 1766843485104
|
|
18
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"iat": 1766842921,
|
|
3
|
+
"exp": 1766843521,
|
|
4
|
+
"accountId": "be4cfcd3-f6dd-41de-b2f5-7e4045d3e78c",
|
|
5
|
+
"authTime": 1766842885,
|
|
6
|
+
"codeChallenge": "BqdP4MPCzvEmeNtCuKNperx_wpsUZSd41h31qsKrjHs",
|
|
7
|
+
"codeChallengeMethod": "S256",
|
|
8
|
+
"grantId": "YFxdDUi4neEPXjx_riL4_Tyg_VXuyhax_qm9yFEvrWG",
|
|
9
|
+
"redirectUri": "http://localhost:4000/demo/public/card.ttl",
|
|
10
|
+
"resource": "urn:solid",
|
|
11
|
+
"scope": "openid offline_access webid",
|
|
12
|
+
"sessionUid": "4uEOfXb2Z3tCyhmDQuG53CpYdqkNf2FfaejZWA-xnqf",
|
|
13
|
+
"kind": "AuthorizationCode",
|
|
14
|
+
"jti": "eC1ZBx2mpNsr0OjKMKdkKK69E4EfKV1SwU8p0dWFQTj",
|
|
15
|
+
"clientId": "client_mjocnlbf_dkm0ltze",
|
|
16
|
+
"_id": "eC1ZBx2mpNsr0OjKMKdkKK69E4EfKV1SwU8p0dWFQTj",
|
|
17
|
+
"_expiresAt": 1766843521653
|
|
18
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"iat": 1766842908,
|
|
3
|
+
"exp": 1766843508,
|
|
4
|
+
"accountId": "be4cfcd3-f6dd-41de-b2f5-7e4045d3e78c",
|
|
5
|
+
"authTime": 1766842885,
|
|
6
|
+
"codeChallenge": "8mhdOmnnCBhXBjFUC_tIfIle7O4i-ySSck_ZNnAM-TI",
|
|
7
|
+
"codeChallengeMethod": "S256",
|
|
8
|
+
"grantId": "R2aOui_2A-m6E_aeq_03IyMd6N5OrFJ-lT67cCTuzOL",
|
|
9
|
+
"redirectUri": "http://localhost:4000/demo/public/card.ttl",
|
|
10
|
+
"resource": "urn:solid",
|
|
11
|
+
"scope": "openid offline_access webid",
|
|
12
|
+
"sessionUid": "4uEOfXb2Z3tCyhmDQuG53CpYdqkNf2FfaejZWA-xnqf",
|
|
13
|
+
"kind": "AuthorizationCode",
|
|
14
|
+
"jti": "puWy-HQtx9ONFDhm_Bv-sRcBfm3OQPppRalQ956hLR4",
|
|
15
|
+
"clientId": "client_mjocnc8k_3sd1aoa6",
|
|
16
|
+
"_id": "puWy-HQtx9ONFDhm_Bv-sRcBfm3OQPppRalQ956hLR4",
|
|
17
|
+
"_expiresAt": 1766843508522
|
|
18
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"application_type": "web",
|
|
3
|
+
"grant_types": [
|
|
4
|
+
"authorization_code",
|
|
5
|
+
"refresh_token"
|
|
6
|
+
],
|
|
7
|
+
"id_token_signed_response_alg": "ES256",
|
|
8
|
+
"require_auth_time": false,
|
|
9
|
+
"response_types": [
|
|
10
|
+
"code"
|
|
11
|
+
],
|
|
12
|
+
"subject_type": "public",
|
|
13
|
+
"token_endpoint_auth_method": "client_secret_basic",
|
|
14
|
+
"post_logout_redirect_uris": [],
|
|
15
|
+
"require_pushed_authorization_requests": false,
|
|
16
|
+
"dpop_bound_access_tokens": false,
|
|
17
|
+
"client_id_issued_at": 1766842877,
|
|
18
|
+
"client_id": "client_mjocmpsj_vdrkczw9",
|
|
19
|
+
"client_secret_expires_at": 0,
|
|
20
|
+
"client_secret": "uab7wwtWjqbYV6wpBcVyIo0pDhU7COlN2WEJ5AOr4EX2lmKmY3gxvGpb_YGs09ysVM9RiHs3pO0EsVIEW98XaQ",
|
|
21
|
+
"redirect_uris": [
|
|
22
|
+
"http://localhost:4000/demo/public/card.ttl"
|
|
23
|
+
],
|
|
24
|
+
"_id": "client_mjocmpsj_vdrkczw9"
|
|
25
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"application_type": "web",
|
|
3
|
+
"grant_types": [
|
|
4
|
+
"authorization_code",
|
|
5
|
+
"refresh_token"
|
|
6
|
+
],
|
|
7
|
+
"id_token_signed_response_alg": "ES256",
|
|
8
|
+
"require_auth_time": false,
|
|
9
|
+
"response_types": [
|
|
10
|
+
"code"
|
|
11
|
+
],
|
|
12
|
+
"subject_type": "public",
|
|
13
|
+
"token_endpoint_auth_method": "client_secret_basic",
|
|
14
|
+
"post_logout_redirect_uris": [],
|
|
15
|
+
"require_pushed_authorization_requests": false,
|
|
16
|
+
"dpop_bound_access_tokens": false,
|
|
17
|
+
"client_id_issued_at": 1766842907,
|
|
18
|
+
"client_id": "client_mjocnc8k_3sd1aoa6",
|
|
19
|
+
"client_secret_expires_at": 0,
|
|
20
|
+
"client_secret": "bDLVLSo0s3P7u93bfPDrLw74PAaq8hguSjVfanz0il6V9cCFLshHECGUuNKA8fhgIpCuzdqOX2aBXv8jHwEL2g",
|
|
21
|
+
"redirect_uris": [
|
|
22
|
+
"http://localhost:4000/demo/public/card.ttl"
|
|
23
|
+
],
|
|
24
|
+
"_id": "client_mjocnc8k_3sd1aoa6"
|
|
25
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"application_type": "web",
|
|
3
|
+
"grant_types": [
|
|
4
|
+
"authorization_code",
|
|
5
|
+
"refresh_token"
|
|
6
|
+
],
|
|
7
|
+
"id_token_signed_response_alg": "ES256",
|
|
8
|
+
"require_auth_time": false,
|
|
9
|
+
"response_types": [
|
|
10
|
+
"code"
|
|
11
|
+
],
|
|
12
|
+
"subject_type": "public",
|
|
13
|
+
"token_endpoint_auth_method": "client_secret_basic",
|
|
14
|
+
"post_logout_redirect_uris": [],
|
|
15
|
+
"require_pushed_authorization_requests": false,
|
|
16
|
+
"dpop_bound_access_tokens": false,
|
|
17
|
+
"client_id_issued_at": 1766842918,
|
|
18
|
+
"client_id": "client_mjocnlbf_dkm0ltze",
|
|
19
|
+
"client_secret_expires_at": 0,
|
|
20
|
+
"client_secret": "ag53idPGzSjObWZSvKjxAmaNTsF7p6o8YSwf-3RRucHfTDe-kTmlGU6DYrjqo4qlmWGbWB1jRuCZY8OByg6rqw",
|
|
21
|
+
"redirect_uris": [
|
|
22
|
+
"http://localhost:4000/demo/public/card.ttl"
|
|
23
|
+
],
|
|
24
|
+
"_id": "client_mjocnlbf_dkm0ltze"
|
|
25
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"iat": 1766842880,
|
|
3
|
+
"exp": 1768052480,
|
|
4
|
+
"accountId": "be4cfcd3-f6dd-41de-b2f5-7e4045d3e78c",
|
|
5
|
+
"clientId": "client_mjocmpsj_vdrkczw9",
|
|
6
|
+
"kind": "Grant",
|
|
7
|
+
"jti": "ImpM7BIsyKuhvme7UOctBmRUicTsZweHOrHk95wza0s",
|
|
8
|
+
"openid": {
|
|
9
|
+
"scope": "openid offline_access webid"
|
|
10
|
+
},
|
|
11
|
+
"resources": {
|
|
12
|
+
"urn:solid": "openid offline_access webid"
|
|
13
|
+
},
|
|
14
|
+
"_id": "ImpM7BIsyKuhvme7UOctBmRUicTsZweHOrHk95wza0s",
|
|
15
|
+
"_expiresAt": 1768052480543
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"iat": 1766842907,
|
|
3
|
+
"exp": 1768052507,
|
|
4
|
+
"accountId": "be4cfcd3-f6dd-41de-b2f5-7e4045d3e78c",
|
|
5
|
+
"clientId": "client_mjocnc8k_3sd1aoa6",
|
|
6
|
+
"kind": "Grant",
|
|
7
|
+
"jti": "R2aOui_2A-m6E_aeq_03IyMd6N5OrFJ-lT67cCTuzOL",
|
|
8
|
+
"openid": {
|
|
9
|
+
"scope": "openid offline_access webid"
|
|
10
|
+
},
|
|
11
|
+
"resources": {
|
|
12
|
+
"urn:solid": "openid offline_access webid"
|
|
13
|
+
},
|
|
14
|
+
"_id": "R2aOui_2A-m6E_aeq_03IyMd6N5OrFJ-lT67cCTuzOL",
|
|
15
|
+
"_expiresAt": 1768052507087
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"iat": 1766842918,
|
|
3
|
+
"exp": 1768052518,
|
|
4
|
+
"accountId": "be4cfcd3-f6dd-41de-b2f5-7e4045d3e78c",
|
|
5
|
+
"clientId": "client_mjocnlbf_dkm0ltze",
|
|
6
|
+
"kind": "Grant",
|
|
7
|
+
"jti": "YFxdDUi4neEPXjx_riL4_Tyg_VXuyhax_qm9yFEvrWG",
|
|
8
|
+
"openid": {
|
|
9
|
+
"scope": "openid offline_access webid"
|
|
10
|
+
},
|
|
11
|
+
"resources": {
|
|
12
|
+
"urn:solid": "openid offline_access webid"
|
|
13
|
+
},
|
|
14
|
+
"_id": "YFxdDUi4neEPXjx_riL4_Tyg_VXuyhax_qm9yFEvrWG",
|
|
15
|
+
"_expiresAt": 1768052518858
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"iat": 1766842885,
|
|
3
|
+
"exp": 1768052485,
|
|
4
|
+
"accountId": "be4cfcd3-f6dd-41de-b2f5-7e4045d3e78c",
|
|
5
|
+
"clientId": "client_mjocmpsj_vdrkczw9",
|
|
6
|
+
"kind": "Grant",
|
|
7
|
+
"jti": "k5rDpXSPbMMzYLaWILONhIojmzNP6f1hkWxajC_weW3",
|
|
8
|
+
"openid": {
|
|
9
|
+
"scope": "openid offline_access webid"
|
|
10
|
+
},
|
|
11
|
+
"resources": {
|
|
12
|
+
"urn:solid": "openid offline_access webid"
|
|
13
|
+
},
|
|
14
|
+
"_id": "k5rDpXSPbMMzYLaWILONhIojmzNP6f1hkWxajC_weW3",
|
|
15
|
+
"_expiresAt": 1768052485093
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"iat": 1766842921,
|
|
3
|
+
"exp": 1768052521,
|
|
4
|
+
"accountId": "be4cfcd3-f6dd-41de-b2f5-7e4045d3e78c",
|
|
5
|
+
"clientId": "client_mjocnlbf_dkm0ltze",
|
|
6
|
+
"kind": "Grant",
|
|
7
|
+
"jti": "luO7y4I33a7yWi1BnfgOtoNcr1-5vH8l3t-aIqG8IgI",
|
|
8
|
+
"openid": {
|
|
9
|
+
"scope": "openid offline_access webid"
|
|
10
|
+
},
|
|
11
|
+
"resources": {
|
|
12
|
+
"urn:solid": "openid offline_access webid"
|
|
13
|
+
},
|
|
14
|
+
"_id": "luO7y4I33a7yWi1BnfgOtoNcr1-5vH8l3t-aIqG8IgI",
|
|
15
|
+
"_expiresAt": 1768052521645
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"iat": 1766842908,
|
|
3
|
+
"exp": 1768052508,
|
|
4
|
+
"accountId": "be4cfcd3-f6dd-41de-b2f5-7e4045d3e78c",
|
|
5
|
+
"clientId": "client_mjocnc8k_3sd1aoa6",
|
|
6
|
+
"kind": "Grant",
|
|
7
|
+
"jti": "nkXTstzTTyrUEN5H0f8Q-YR5jMqk0WdDc6H6H1XD6lJ",
|
|
8
|
+
"openid": {
|
|
9
|
+
"scope": "openid offline_access webid"
|
|
10
|
+
},
|
|
11
|
+
"resources": {
|
|
12
|
+
"urn:solid": "openid offline_access webid"
|
|
13
|
+
},
|
|
14
|
+
"_id": "nkXTstzTTyrUEN5H0f8Q-YR5jMqk0WdDc6H6H1XD6lJ",
|
|
15
|
+
"_expiresAt": 1768052508513
|
|
16
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"iat": 1766842880,
|
|
3
|
+
"exp": 1768052521,
|
|
4
|
+
"uid": "4uEOfXb2Z3tCyhmDQuG53CpYdqkNf2FfaejZWA-xnqf",
|
|
5
|
+
"accountId": "be4cfcd3-f6dd-41de-b2f5-7e4045d3e78c",
|
|
6
|
+
"loginTs": 1766842885,
|
|
7
|
+
"authorizations": {
|
|
8
|
+
"client_mjocmpsj_vdrkczw9": {
|
|
9
|
+
"sid": "p_xkvzyOVCJq5ZLXM2vmqjV35OIzrYbsqAXzUvpknIc",
|
|
10
|
+
"grantId": "ImpM7BIsyKuhvme7UOctBmRUicTsZweHOrHk95wza0s",
|
|
11
|
+
"persistsLogout": true
|
|
12
|
+
},
|
|
13
|
+
"client_mjocnc8k_3sd1aoa6": {
|
|
14
|
+
"sid": "1SAM86GitibwBsMx8QL-9VCt9Wws4Yq4VMJn4Swf1OY",
|
|
15
|
+
"grantId": "R2aOui_2A-m6E_aeq_03IyMd6N5OrFJ-lT67cCTuzOL",
|
|
16
|
+
"persistsLogout": true
|
|
17
|
+
},
|
|
18
|
+
"client_mjocnlbf_dkm0ltze": {
|
|
19
|
+
"sid": "NuauxuaSNFbSm9ksu10YakHKPm7zhCcEqhLgM51b90b",
|
|
20
|
+
"grantId": "YFxdDUi4neEPXjx_riL4_Tyg_VXuyhax_qm9yFEvrWG",
|
|
21
|
+
"persistsLogout": true
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"kind": "Session",
|
|
25
|
+
"jti": "VXgvz6cHkuwDGG3Hp7CYWzck4AlTDH9qCOnCxVVAGOb",
|
|
26
|
+
"_id": "VXgvz6cHkuwDGG3Hp7CYWzck4AlTDH9qCOnCxVVAGOb",
|
|
27
|
+
"_expiresAt": 1768052521654
|
|
28
|
+
}
|
package/data/demo/.acl
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
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:4000/demo/#me"
|
|
12
|
+
},
|
|
13
|
+
"acl:accessTo": {
|
|
14
|
+
"@id": "http://localhost:4000/demo/"
|
|
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:4000/demo/"
|
|
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:4000/demo/"
|
|
39
|
+
},
|
|
40
|
+
"acl:mode": [
|
|
41
|
+
{
|
|
42
|
+
"@id": "acl:Read"
|
|
43
|
+
}
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
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:4000/demo/#me"
|
|
12
|
+
},
|
|
13
|
+
"acl:accessTo": {
|
|
14
|
+
"@id": "http://localhost:4000/demo/inbox/"
|
|
15
|
+
},
|
|
16
|
+
"acl:default": {
|
|
17
|
+
"@id": "http://localhost:4000/demo/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:4000/demo/inbox/"
|
|
39
|
+
},
|
|
40
|
+
"acl:default": {
|
|
41
|
+
"@id": "http://localhost:4000/demo/inbox/"
|
|
42
|
+
},
|
|
43
|
+
"acl:mode": [
|
|
44
|
+
{
|
|
45
|
+
"@id": "acl:Append"
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
]
|
|
50
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
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>demo'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:4000/demo/",
|
|
35
|
+
"@type": "foaf:PersonalProfileDocument",
|
|
36
|
+
"foaf:maker": {
|
|
37
|
+
"@id": "http://localhost:4000/demo/#me"
|
|
38
|
+
},
|
|
39
|
+
"foaf:primaryTopic": {
|
|
40
|
+
"@id": "http://localhost:4000/demo/#me"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"@id": "http://localhost:4000/demo/#me",
|
|
45
|
+
"@type": [
|
|
46
|
+
"foaf:Person",
|
|
47
|
+
"schema:Person"
|
|
48
|
+
],
|
|
49
|
+
"foaf:name": "demo",
|
|
50
|
+
"inbox": "http://localhost:4000/demo/inbox/",
|
|
51
|
+
"storage": "http://localhost:4000/demo/",
|
|
52
|
+
"oidcIssuer": "http://localhost:4000/",
|
|
53
|
+
"preferencesFile": "http://localhost:4000/demo/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>demo</h1>
|
|
70
|
+
<dl>
|
|
71
|
+
<dt>WebID</dt>
|
|
72
|
+
<dd><a href="http://localhost:4000/demo/#me">http://localhost:4000/demo/#me</a></dd>
|
|
73
|
+
<dt>Storage</dt>
|
|
74
|
+
<dd><a href="http://localhost:4000/demo/">http://localhost:4000/demo/</a></dd>
|
|
75
|
+
<dt>Inbox</dt>
|
|
76
|
+
<dd><a href="http://localhost:4000/demo/inbox/">http://localhost:4000/demo/inbox/</a></dd>
|
|
77
|
+
</dl>
|
|
78
|
+
</div>
|
|
79
|
+
</body>
|
|
80
|
+
</html>
|
|
@@ -0,0 +1,32 @@
|
|
|
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:4000/demo/#me"
|
|
12
|
+
},
|
|
13
|
+
"acl:accessTo": {
|
|
14
|
+
"@id": "http://localhost:4000/demo/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:4000/demo/private/"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
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:4000/demo/#me"
|
|
12
|
+
},
|
|
13
|
+
"acl:accessTo": {
|
|
14
|
+
"@id": "http://localhost:4000/demo/public/"
|
|
15
|
+
},
|
|
16
|
+
"acl:default": {
|
|
17
|
+
"@id": "http://localhost:4000/demo/public/"
|
|
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:4000/demo/public/"
|
|
39
|
+
},
|
|
40
|
+
"acl:default": {
|
|
41
|
+
"@id": "http://localhost:4000/demo/public/"
|
|
42
|
+
},
|
|
43
|
+
"acl:mode": [
|
|
44
|
+
{
|
|
45
|
+
"@id": "acl:Read"
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
]
|
|
50
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
|
|
2
|
+
@prefix solid: <http://www.w3.org/ns/solid/terms#> .
|
|
3
|
+
@prefix schema: <http://schema.org/> .
|
|
4
|
+
|
|
5
|
+
<#me> a foaf:Person ;
|
|
6
|
+
foaf:name "Demo User" ;
|
|
7
|
+
foaf:mbox <mailto:demo@example.com> ;
|
|
8
|
+
schema:knows <https://melvincarvalho.com/#me> .
|
|
@@ -0,0 +1,32 @@
|
|
|
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:4000/demo/#me"
|
|
12
|
+
},
|
|
13
|
+
"acl:accessTo": {
|
|
14
|
+
"@id": "http://localhost:4000/demo/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:4000/demo/settings/"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
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:4000/demo/settings/prefs",
|
|
15
|
+
"publicTypeIndex": "http://localhost:4000/demo/settings/publicTypeIndex",
|
|
16
|
+
"privateTypeIndex": "http://localhost:4000/demo/settings/privateTypeIndex"
|
|
17
|
+
}
|
package/package.json
CHANGED
package/src/idp/interactions.js
CHANGED
|
@@ -118,20 +118,22 @@ export async function handleLogin(request, reply, provider) {
|
|
|
118
118
|
|
|
119
119
|
request.log.info({ accountId: account.id, uid }, 'Login successful');
|
|
120
120
|
|
|
121
|
-
//
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
//
|
|
126
|
-
// We use interactionResult to get the redirect URL, then save it and return JSON
|
|
127
|
-
|
|
128
|
-
// Save the login result to the interaction for programmatic clients
|
|
129
|
-
// This allows the auth endpoint to continue the flow when resumed
|
|
121
|
+
// Detect if this is a browser (wants HTML/redirect) or programmatic client (wants JSON)
|
|
122
|
+
const acceptHeader = request.headers.accept || '';
|
|
123
|
+
const wantsBrowserRedirect = acceptHeader.includes('text/html') && !acceptHeader.includes('application/json');
|
|
124
|
+
|
|
125
|
+
// Save the login result to the interaction
|
|
130
126
|
interaction.result = result;
|
|
131
127
|
await interaction.save(interaction.exp - Math.floor(Date.now() / 1000));
|
|
132
128
|
|
|
133
|
-
// For
|
|
134
|
-
|
|
129
|
+
// For browsers (mashlib, etc): do a proper HTTP redirect
|
|
130
|
+
if (wantsBrowserRedirect) {
|
|
131
|
+
reply.hijack();
|
|
132
|
+
return provider.interactionFinished(request.raw, reply.raw, result, { mergeWithLastSubmission: false });
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
// For CTH and programmatic clients: return JSON with location
|
|
136
|
+
// CTH expects a 200 response with "location" in body (CSS v3+ style)
|
|
135
137
|
try {
|
|
136
138
|
reply.hijack();
|
|
137
139
|
|
|
@@ -188,7 +190,6 @@ export async function handleLogin(request, reply, provider) {
|
|
|
188
190
|
request.log.warn({ err: err.message, errName: err.name, uid }, 'interactionFinished failed, using fallback');
|
|
189
191
|
|
|
190
192
|
// Fallback: return the redirect URL for manual following
|
|
191
|
-
// The interaction result is already saved above
|
|
192
193
|
const redirectTo = `/idp/auth/${uid}`;
|
|
193
194
|
return reply
|
|
194
195
|
.code(200)
|
package/src/utils/url.js
CHANGED
|
@@ -120,7 +120,13 @@ export function getContentType(filePath) {
|
|
|
120
120
|
'.jpeg': 'image/jpeg',
|
|
121
121
|
'.gif': 'image/gif',
|
|
122
122
|
'.svg': 'image/svg+xml',
|
|
123
|
-
'.pdf': 'application/pdf'
|
|
123
|
+
'.pdf': 'application/pdf',
|
|
124
|
+
'.ttl': 'text/turtle',
|
|
125
|
+
'.n3': 'text/n3',
|
|
126
|
+
'.nt': 'application/n-triples',
|
|
127
|
+
'.rdf': 'application/rdf+xml',
|
|
128
|
+
'.nq': 'application/n-quads',
|
|
129
|
+
'.trig': 'application/trig'
|
|
124
130
|
};
|
|
125
131
|
return types[ext] || 'application/octet-stream';
|
|
126
132
|
}
|
|
@@ -131,5 +137,15 @@ export function getContentType(filePath) {
|
|
|
131
137
|
* @returns {boolean}
|
|
132
138
|
*/
|
|
133
139
|
export function isRdfContentType(contentType) {
|
|
134
|
-
|
|
140
|
+
const rdfTypes = [
|
|
141
|
+
'application/ld+json',
|
|
142
|
+
'application/json',
|
|
143
|
+
'text/turtle',
|
|
144
|
+
'text/n3',
|
|
145
|
+
'application/n-triples',
|
|
146
|
+
'application/rdf+xml',
|
|
147
|
+
'application/n-quads',
|
|
148
|
+
'application/trig'
|
|
149
|
+
];
|
|
150
|
+
return rdfTypes.includes(contentType);
|
|
135
151
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "b49949d9-6d61-45a1-bcee-07295aa07579",
|
|
3
|
+
"email": "credtest@example.com",
|
|
4
|
+
"passwordHash": "$2b$10$mVzAvASfYaz/wtb7ENo.D..AKd5CWHnOqAeL3RRPGfH20AbZG.ZEm",
|
|
5
|
+
"webId": "http://localhost:3101/credtest/#me",
|
|
6
|
+
"podName": "credtest",
|
|
7
|
+
"createdAt": "2025-12-27T13:40:23.165Z",
|
|
8
|
+
"lastLogin": "2025-12-27T13:40:23.500Z"
|
|
9
|
+
}
|
|
@@ -3,20 +3,20 @@
|
|
|
3
3
|
"keys": [
|
|
4
4
|
{
|
|
5
5
|
"kty": "EC",
|
|
6
|
-
"x": "
|
|
7
|
-
"y": "
|
|
6
|
+
"x": "LAyVHoAoNTkPv1-7GonFPGYWWh2Oo8W1bxWFGdX8fW8",
|
|
7
|
+
"y": "bntHv0EpOcvKrzlGujXkBID_7iHmp9wFte4heIrzf3Y",
|
|
8
8
|
"crv": "P-256",
|
|
9
|
-
"d": "
|
|
10
|
-
"kid": "
|
|
9
|
+
"d": "V6umt-paD0-Uk9SA-0NYZHZSOz0h9OZppYwopeZXedo",
|
|
10
|
+
"kid": "1c8e0740-f688-4a68-8231-8d2388dcd810",
|
|
11
11
|
"use": "sig",
|
|
12
12
|
"alg": "ES256",
|
|
13
|
-
"iat":
|
|
13
|
+
"iat": 1766842823
|
|
14
14
|
}
|
|
15
15
|
]
|
|
16
16
|
},
|
|
17
17
|
"cookieKeys": [
|
|
18
|
-
"
|
|
19
|
-
"
|
|
18
|
+
"pq7a_Nu9u72ZeHdklGCnSocY9z4nyAkk0ZuUBU8YH7U",
|
|
19
|
+
"RzXV-DugE1lvl331HZ5Fo04A5UY2GLJn4MjAqcAZ8Ts"
|
|
20
20
|
],
|
|
21
|
-
"createdAt": "2025-12-27T13:
|
|
21
|
+
"createdAt": "2025-12-27T13:40:23.081Z"
|
|
22
22
|
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"id": "ea61c611-2dda-41b8-8787-c6a22c5f33cc",
|
|
3
|
-
"email": "credtest@example.com",
|
|
4
|
-
"passwordHash": "$2b$10$EVWVKsbQ4A6DdswLEK/0ZOclDrBHBo/9GbWeP1s5uvxy4jWjTnY0m",
|
|
5
|
-
"webId": "http://localhost:3101/credtest/#me",
|
|
6
|
-
"podName": "credtest",
|
|
7
|
-
"createdAt": "2025-12-27T13:12:43.961Z",
|
|
8
|
-
"lastLogin": "2025-12-27T13:12:44.207Z"
|
|
9
|
-
}
|