solid-server 5.8.8-8d509db1 → 5.8.8-90b76b88
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/common/js/auth-buttons.mjs +20 -20
- package/common/js/index-buttons.mjs +31 -30
- package/common/js/solid.mjs +11 -11
- package/config/defaults.mjs +1 -1
- package/config/templates/server/index.html +1 -1
- package/coverage/tmp/coverage-2252-1767784854167-0.json +1 -0
- package/coverage/tmp/{coverage-2255-1766613179053-0.json → coverage-2253-1767784832543-0.json} +1 -1
- package/default-templates/server/index.html +1 -1
- package/eslint.config.mjs +102 -0
- package/index.mjs +8 -8
- package/lib/acl-checker.mjs +1 -3
- package/lib/handlers/copy.mjs +0 -2
- package/lib/handlers/cors-proxy.mjs +2 -4
- package/lib/handlers/get.mjs +12 -8
- package/lib/handlers/index.mjs +0 -2
- package/lib/handlers/options.mjs +0 -2
- package/lib/ldp.mjs +0 -3
- package/lib/models/account-manager.mjs +2 -2
- package/lib/models/oidc-manager.mjs +0 -1
- package/lib/resource-mapper.mjs +1 -3
- package/lib/utils.mjs +0 -2
- package/lib/webid/lib/get.mjs +0 -1
- package/lib/webid/tls/index.mjs +0 -1
- package/package.json +39 -38
- package/solid-server-5.8.8.tgz +0 -0
- package/test/index.mjs +0 -1
- package/test/integration/account-manager-test.mjs +2 -3
- package/test/integration/account-template-test.mjs +0 -1
- package/test/integration/acl-oidc-test.mjs +0 -1
- package/test/integration/authentication-oidc-test.mjs +13 -8
- package/test/integration/authentication-oidc-with-strict-origins-turned-off-test.mjs +14 -9
- package/test/integration/capability-discovery-test.mjs +0 -1
- package/test/integration/oidc-manager-test.mjs +95 -2
- package/test/integration/params-test.mjs +5 -5
- package/test/integration/patch-test.mjs +29 -12
- package/test/integration/quota-test.mjs +0 -1
- package/test/integration/www-account-creation-oidc-test.mjs +0 -1
- package/test/resources/accounts/db/oidc/op/clients/{_key_30860bb5cf6ba07e80ed7b2e7178c7ad.json → _key_c1c49f6ff9e9631cf4c7018f962d2aae.json} +1 -1
- package/test/resources/accounts/db/oidc/op/provider.json +345 -1
- package/test/resources/accounts/db/oidc/rp/clients/_key_https%3A%2F%2Flocalhost%3A3457.json +1 -1
- package/test/resources/accounts-acl/db/oidc/op/provider.json +345 -1
- package/test/resources/accounts-scenario/alice/db/oidc/op/clients/{_key_e46bcfe080c59f5cbb53a559d6a272cb.json → _key_d6a7a43b910d2811992779cde33d0364.json} +1 -1
- package/test/resources/accounts-scenario/alice/db/oidc/op/provider.json +658 -89
- package/test/resources/accounts-scenario/alice/db/oidc/rp/clients/_key_https%3A%2F%2Flocalhost%3A7000.json +1 -1
- package/test/resources/accounts-scenario/bob/db/oidc/op/clients/{_key_e7fd102ec26a3dcd5916751e01a62315.json → _key_c8d992732b9a955b6ac77873670a7d9a.json} +1 -1
- package/test/resources/accounts-scenario/bob/db/oidc/op/provider.json +658 -89
- package/test/resources/accounts-scenario/bob/db/oidc/rp/clients/_key_https%3A%2F%2Flocalhost%3A7001.json +1 -1
- package/test/resources/accounts-scenario/charlie/db/oidc/op/clients/{_key_0eec962830f849876695b69df76a3137.json → _key_4ec13ac7015e279a4449ceafe4fa19c0.json} +1 -1
- package/test/resources/accounts-scenario/charlie/db/oidc/op/provider.json +345 -1
- package/test/resources/accounts-scenario/charlie/db/oidc/rp/clients/_key_https%3A%2F%2Flocalhost%3A5002.json +1 -1
- package/test/resources/accounts-strict-origin-off/alice/db/oidc/op/clients/{_key_7d536a1f8c6eb86f41261e171a8af79a.json → _key_26bcccb6d8af789f934ec3628e5c4b8b.json} +1 -1
- package/test/resources/accounts-strict-origin-off/alice/db/oidc/op/provider.json +345 -1
- package/test/resources/accounts-strict-origin-off/alice/db/oidc/rp/clients/_key_https%3A%2F%2Flocalhost%3A7010.json +1 -1
- package/test/resources/accounts-strict-origin-off/bob/db/oidc/op/clients/{_key_0ed30b9e076814c6f6445582302487c2.json → _key_bc54c25bdca9feab602988743c29af98.json} +1 -1
- package/test/resources/accounts-strict-origin-off/bob/db/oidc/op/provider.json +345 -1
- package/test/resources/accounts-strict-origin-off/bob/db/oidc/rp/clients/_key_https%3A%2F%2Flocalhost%3A7011.json +1 -1
- package/test/resources/config/templates/server/index.html +1 -1
- package/test/unit/account-manager-test.mjs +2 -2
- package/test/unit/account-template-test.mjs +0 -1
- package/test/unit/add-cert-request-test.mjs +0 -1
- package/test/unit/email-service-test.mjs +0 -1
- package/test/unit/email-welcome-test.mjs +1 -2
- package/test/unit/esm-imports.test.mjs +0 -1
- package/test/unit/oidc-manager-test.mjs +0 -1
- package/test/unit/solid-host-test.mjs +0 -1
- package/test/unit/user-account-test.mjs +0 -1
- package/test/unit/utils-test.mjs +1 -3
- package/test/utils/index.mjs +0 -1
- package/test/utils.mjs +3 -4
- package/test/validate-turtle.mjs +0 -1
- package/common/js/auth-buttons.js +0 -67
- package/common/js/index-buttons.js +0 -44
- package/config/defaults.js +0 -25
- package/config/templates/emails/delete-account.js +0 -49
- package/config/templates/emails/invalid-username.js +0 -30
- package/config/templates/emails/reset-password.js +0 -49
- package/config/templates/emails/welcome.js +0 -39
- package/coverage/tmp/coverage-2254-1766613200322-0.json +0 -1
- package/default-templates/emails/delete-account.js +0 -49
- package/default-templates/emails/invalid-username.js +0 -30
- package/default-templates/emails/reset-password.js +0 -49
- package/default-templates/emails/welcome.js +0 -39
|
@@ -6,7 +6,6 @@ import { UserStore } from '@solid/oidc-auth-manager'
|
|
|
6
6
|
import UserAccount from '../../lib/models/user-account.mjs'
|
|
7
7
|
import SolidAuthOIDC from '@solid/solid-auth-oidc'
|
|
8
8
|
|
|
9
|
-
import fetch from 'node-fetch'
|
|
10
9
|
import localStorage from 'localstorage-memory'
|
|
11
10
|
import { URL, URLSearchParams } from 'whatwg-url'
|
|
12
11
|
import { cleanDir, cp } from '../utils.mjs'
|
|
@@ -463,7 +462,7 @@ describe('Authentication API (OIDC) - With strict origins turned off', () => {
|
|
|
463
462
|
// Since user is not logged in, /authorize redirects to /login
|
|
464
463
|
expect(res.status).to.equal(302)
|
|
465
464
|
|
|
466
|
-
loginUri = new URL(res.headers.get('location'))
|
|
465
|
+
loginUri = new URL(res.headers.get('location'), aliceServerUri)
|
|
467
466
|
expect(loginUri.toString().startsWith(aliceServerUri + '/login'))
|
|
468
467
|
.to.be.true()
|
|
469
468
|
|
|
@@ -507,8 +506,11 @@ describe('Authentication API (OIDC) - With strict origins turned off', () => {
|
|
|
507
506
|
})
|
|
508
507
|
.then(res => {
|
|
509
508
|
expect(res.status).to.equal(302)
|
|
510
|
-
|
|
511
|
-
|
|
509
|
+
const location = res.headers.get('location')
|
|
510
|
+
postLoginUri = new URL(location, aliceServerUri).toString()
|
|
511
|
+
// Native fetch: get first set-cookie header
|
|
512
|
+
const setCookieHeaders = res.headers.getSetCookie ? res.headers.getSetCookie() : [res.headers.get('set-cookie')]
|
|
513
|
+
cookie = setCookieHeaders[0]
|
|
512
514
|
|
|
513
515
|
// Successful login gets redirected back to /authorize and then
|
|
514
516
|
// back to app
|
|
@@ -533,20 +535,23 @@ describe('Authentication API (OIDC) - With strict origins turned off', () => {
|
|
|
533
535
|
})
|
|
534
536
|
.then(res => {
|
|
535
537
|
expect(res.status).to.equal(302)
|
|
536
|
-
const
|
|
537
|
-
const
|
|
538
|
+
const location = res.headers.get('location')
|
|
539
|
+
const postSharingUri = new URL(location, aliceServerUri).toString()
|
|
540
|
+
const setCookieHeaders = res.headers.getSetCookie ? res.headers.getSetCookie() : [res.headers.get('set-cookie')]
|
|
541
|
+
const cookieFromSharing = setCookieHeaders[0] || cookie
|
|
538
542
|
|
|
539
543
|
// Successful login gets redirected back to /authorize and then
|
|
540
544
|
// back to app
|
|
541
|
-
expect(
|
|
545
|
+
expect(postSharingUri.startsWith(aliceServerUri + '/authorize'))
|
|
542
546
|
.to.be.true()
|
|
543
547
|
|
|
544
|
-
return fetch(
|
|
548
|
+
return fetch(postSharingUri, { redirect: 'manual', headers: { cookie: cookieFromSharing } })
|
|
545
549
|
})
|
|
546
550
|
.then(res => {
|
|
547
551
|
// User gets redirected back to original app
|
|
548
552
|
expect(res.status).to.equal(302)
|
|
549
|
-
|
|
553
|
+
const location = res.headers.get('location')
|
|
554
|
+
callbackUri = location.startsWith('http') ? location : new URL(location, aliceServerUri).toString()
|
|
550
555
|
expect(callbackUri.startsWith('https://app.example.com#'))
|
|
551
556
|
})
|
|
552
557
|
})
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/* eslint-disable no-unused-expressions */
|
|
2
1
|
import { fileURLToPath } from 'url'
|
|
3
2
|
import path from 'path'
|
|
3
|
+
import { URL } from 'url'
|
|
4
4
|
import chai from 'chai'
|
|
5
5
|
import fs from 'fs-extra'
|
|
6
6
|
import { fromServerConfig } from '../../lib/models/oidc-manager.mjs'
|
|
@@ -38,5 +38,98 @@ describe('OidcManager', () => {
|
|
|
38
38
|
expect(oidc.users.backend.path.endsWith('db/oidc/users'))
|
|
39
39
|
expect(oidc.users.saltRounds).to.equal(saltRounds)
|
|
40
40
|
})
|
|
41
|
+
|
|
42
|
+
it('should set the provider issuer which is used for iss claim in tokens', () => {
|
|
43
|
+
const providerUri = 'https://pivot-test.solidproject.org:8443'
|
|
44
|
+
const host = SolidHost.from({ serverUri: providerUri })
|
|
45
|
+
|
|
46
|
+
const saltRounds = 5
|
|
47
|
+
const argv = {
|
|
48
|
+
host,
|
|
49
|
+
dbPath,
|
|
50
|
+
saltRounds
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
const oidc = fromServerConfig(argv)
|
|
54
|
+
|
|
55
|
+
// Verify the issuer is set correctly for RFC 9207 compliance
|
|
56
|
+
// The iss claim in tokens should match this issuer value
|
|
57
|
+
expect(oidc.provider.issuer).to.exist
|
|
58
|
+
expect(oidc.provider.issuer).to.not.be.null
|
|
59
|
+
expect(oidc.provider.issuer).to.equal(providerUri)
|
|
60
|
+
console.log('Provider issuer (used for iss claim):', oidc.provider.issuer)
|
|
61
|
+
})
|
|
62
|
+
})
|
|
63
|
+
|
|
64
|
+
describe('RFC 9207 - Authorization redirect with iss parameter', () => {
|
|
65
|
+
it('should include iss parameter when redirecting after authorization', async () => {
|
|
66
|
+
const providerUri = 'https://localhost:8443'
|
|
67
|
+
const host = SolidHost.from({ providerUri })
|
|
68
|
+
|
|
69
|
+
const argv = {
|
|
70
|
+
host,
|
|
71
|
+
dbPath,
|
|
72
|
+
saltRounds: 5
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
const oidc = fromServerConfig(argv)
|
|
76
|
+
|
|
77
|
+
// Dynamically import BaseRequest from oidc-op
|
|
78
|
+
const { default: BaseRequest } = await import('@solid/oidc-op/src/handlers/BaseRequest.js')
|
|
79
|
+
|
|
80
|
+
// Create a mock request/response to test the redirect behavior
|
|
81
|
+
const mockReq = {
|
|
82
|
+
method: 'GET',
|
|
83
|
+
query: {
|
|
84
|
+
response_type: 'code',
|
|
85
|
+
redirect_uri: 'https://app.example.com/callback',
|
|
86
|
+
client_id: 'https://app.example.com',
|
|
87
|
+
state: 'test-state'
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
const mockRes = {
|
|
92
|
+
redirectCalled: false,
|
|
93
|
+
redirectUrl: '',
|
|
94
|
+
redirect (url) {
|
|
95
|
+
this.redirectCalled = true
|
|
96
|
+
this.redirectUrl = url
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
const request = new BaseRequest(mockReq, mockRes, oidc.provider)
|
|
101
|
+
request.params = mockReq.query
|
|
102
|
+
|
|
103
|
+
// Simulate a successful authorization by calling redirect with auth data
|
|
104
|
+
try {
|
|
105
|
+
request.redirect({ code: 'test-auth-code' })
|
|
106
|
+
} catch (err) {
|
|
107
|
+
// The redirect throws a HandledError, which is expected behavior
|
|
108
|
+
// We just need to check that the redirect was called with the right URL
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
expect(mockRes.redirectCalled).to.be.true
|
|
112
|
+
expect(mockRes.redirectUrl).to.exist
|
|
113
|
+
|
|
114
|
+
// Parse the redirect URL to check for iss parameter
|
|
115
|
+
const redirectUrl = new URL(mockRes.redirectUrl)
|
|
116
|
+
|
|
117
|
+
// The iss parameter can be in either the query string or hash fragment
|
|
118
|
+
// depending on the response_mode (query or fragment)
|
|
119
|
+
let issParam = redirectUrl.searchParams.get('iss')
|
|
120
|
+
if (!issParam && redirectUrl.hash) {
|
|
121
|
+
// Check in the hash fragment
|
|
122
|
+
const hashParams = new URLSearchParams(redirectUrl.hash.substring(1))
|
|
123
|
+
issParam = hashParams.get('iss')
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
console.log('Redirect URL:', mockRes.redirectUrl)
|
|
127
|
+
console.log('RFC 9207 - iss parameter in redirect:', issParam)
|
|
128
|
+
|
|
129
|
+
// RFC 9207: The iss parameter MUST be present and match the provider issuer
|
|
130
|
+
expect(issParam, 'RFC 9207: iss parameter must be present in authorization response').to.exist
|
|
131
|
+
expect(issParam).to.not.be.null
|
|
132
|
+
expect(issParam).to.equal(providerUri)
|
|
133
|
+
})
|
|
41
134
|
})
|
|
42
|
-
})
|
|
135
|
+
})
|
|
@@ -11,7 +11,7 @@ import ldnode, { createServer } from '../../index.mjs'
|
|
|
11
11
|
|
|
12
12
|
const __filename = fileURLToPath(import.meta.url)
|
|
13
13
|
const __dirname = path.dirname(__filename)
|
|
14
|
-
console.log(getTestRoot())
|
|
14
|
+
// console.log(getTestRoot())
|
|
15
15
|
|
|
16
16
|
describe('LDNODE params', function () {
|
|
17
17
|
describe('suffixMeta', function () {
|
|
@@ -46,7 +46,7 @@ describe('LDNODE params', function () {
|
|
|
46
46
|
|
|
47
47
|
it('should fallback on current working directory', function () {
|
|
48
48
|
assert.equal(path.normalize(ldp.locals.ldp.resourceMapper._rootPath), path.normalize(process.cwd()))
|
|
49
|
-
console.log('Root path is', ldp.locals.ldp.resourceMapper._rootPath)
|
|
49
|
+
// console.log('Root path is', ldp.locals.ldp.resourceMapper._rootPath)
|
|
50
50
|
})
|
|
51
51
|
|
|
52
52
|
it('new : should find resource in correct path', function (done) {
|
|
@@ -57,7 +57,7 @@ describe('LDNODE params', function () {
|
|
|
57
57
|
const fileContent = '<#current> <#temp> 123 .'
|
|
58
58
|
fs.mkdirSync(dirPath, { recursive: true })
|
|
59
59
|
fs.writeFileSync(filePath, fileContent)
|
|
60
|
-
console.log('Wrote file to', filePath)
|
|
60
|
+
// console.log('Wrote file to', filePath)
|
|
61
61
|
server.get('/sampleContainer/example.ttl')
|
|
62
62
|
.expect('Link', /http:\/\/www.w3.org\/ns\/ldp#Resource/)
|
|
63
63
|
.expect(200)
|
|
@@ -71,7 +71,7 @@ describe('LDNODE params', function () {
|
|
|
71
71
|
it.skip('initial : should find resource in correct path', function (done) {
|
|
72
72
|
// Write to the default resources directory, matching the server's root
|
|
73
73
|
const resourcePath = path.join('sampleContainer', 'example.ttl')
|
|
74
|
-
console.log('initial : Writing test resource to', resourcePath)
|
|
74
|
+
// console.log('initial : Writing test resource to', resourcePath)
|
|
75
75
|
setTestRoot(path.join(__dirname, '../resources/'))
|
|
76
76
|
write('<#current> <#temp> 123 .', resourcePath)
|
|
77
77
|
|
|
@@ -102,7 +102,7 @@ describe('LDNODE params', function () {
|
|
|
102
102
|
const fileContent = '<#current> <#temp> 123 .'
|
|
103
103
|
fs.mkdirSync(dirPath, { recursive: true })
|
|
104
104
|
fs.writeFileSync(filePath, fileContent)
|
|
105
|
-
console.log('Wrote file to', filePath)
|
|
105
|
+
// console.log('Wrote file to', filePath)
|
|
106
106
|
|
|
107
107
|
server.get('/sampleContainer/example.ttl')
|
|
108
108
|
.expect('Link', /http:\/\/www.w3.org\/ns\/ldp#Resource/)
|
|
@@ -93,7 +93,8 @@ describe('PATCH through text/n3', () => {
|
|
|
93
93
|
}, { // expected:
|
|
94
94
|
status: 201,
|
|
95
95
|
text: 'Patch applied successfully',
|
|
96
|
-
result: '@prefix : </new.ttl#>.\n@prefix tim: </>.\n\ntim:x tim:y tim:z.\n\n'
|
|
96
|
+
// result: '@prefix : </new.ttl#>.\n@prefix tim: </>.\n\ntim:x tim:y tim:z.\n\n'
|
|
97
|
+
result: '@prefix : </new.ttl#>.\n\n</x> </y> </z>.\n\n'
|
|
97
98
|
}))
|
|
98
99
|
|
|
99
100
|
describe('on a non-existent JSON-LD file', describePatch({
|
|
@@ -105,7 +106,7 @@ describe('PATCH through text/n3', () => {
|
|
|
105
106
|
status: 201,
|
|
106
107
|
text: 'Patch applied successfully',
|
|
107
108
|
// result: '{\n "@id": "/x",\n "/y": {\n "@id": "/z"\n }\n}'
|
|
108
|
-
result: `{
|
|
109
|
+
/* result: `{
|
|
109
110
|
"@context": {
|
|
110
111
|
"tim": "https://tim.localhost:7777/"
|
|
111
112
|
},
|
|
@@ -113,6 +114,12 @@ describe('PATCH through text/n3', () => {
|
|
|
113
114
|
"tim:y": {
|
|
114
115
|
"@id": "tim:z"
|
|
115
116
|
}
|
|
117
|
+
}` */
|
|
118
|
+
result: `{
|
|
119
|
+
"@id": "https://tim.localhost:7777/x",
|
|
120
|
+
"https://tim.localhost:7777/y": {
|
|
121
|
+
"@id": "https://tim.localhost:7777/z"
|
|
122
|
+
}
|
|
116
123
|
}`
|
|
117
124
|
}))
|
|
118
125
|
|
|
@@ -140,7 +147,8 @@ describe('PATCH through text/n3', () => {
|
|
|
140
147
|
}, { // expected:
|
|
141
148
|
status: 201,
|
|
142
149
|
text: 'Patch applied successfully',
|
|
143
|
-
result: '@prefix : </new.n3#>.\n@prefix tim: </>.\n\ntim:x tim:y tim:z.\n\n'
|
|
150
|
+
// result: '@prefix : </new.n3#>.\n@prefix tim: </>.\n\ntim:x tim:y tim:z.\n\n'
|
|
151
|
+
result: '@prefix : </new.n3#>.\n\n</x> </y> </z>.\n\n'
|
|
144
152
|
}))
|
|
145
153
|
|
|
146
154
|
describe('on an N3 file that has an invalid uri (*.acl)', describePatch({
|
|
@@ -179,7 +187,8 @@ describe('PATCH through text/n3', () => {
|
|
|
179
187
|
}, { // expected:
|
|
180
188
|
status: 200,
|
|
181
189
|
text: 'Patch applied successfully',
|
|
182
|
-
result: '@prefix : </append-only.ttl#>.\n@prefix tim: </>.\n\ntim:a tim:b tim:c.\n\ntim:d tim:e tim:f.\n\ntim:x tim:y tim:z.\n\n'
|
|
190
|
+
// result: '@prefix : </append-only.ttl#>.\n@prefix tim: </>.\n\ntim:a tim:b tim:c.\n\ntim:d tim:e tim:f.\n\ntim:x tim:y tim:z.\n\n'
|
|
191
|
+
result: '@prefix : </append-only.ttl#>.\n\n</a> </b> </c>.\n\n</d> </e> </f>.\n\n</x> </y> </z>.\n\n'
|
|
183
192
|
}))
|
|
184
193
|
|
|
185
194
|
describe('on a resource with write-only access', describePatch({
|
|
@@ -189,7 +198,8 @@ describe('PATCH through text/n3', () => {
|
|
|
189
198
|
}, { // expected:
|
|
190
199
|
status: 200,
|
|
191
200
|
text: 'Patch applied successfully',
|
|
192
|
-
result: '@prefix : </write-only.ttl#>.\n@prefix tim: </>.\n\ntim:a tim:b tim:c.\n\ntim:d tim:e tim:f.\n\ntim:x tim:y tim:z.\n\n'
|
|
201
|
+
// result: '@prefix : </write-only.ttl#>.\n@prefix tim: </>.\n\ntim:a tim:b tim:c.\n\ntim:d tim:e tim:f.\n\ntim:x tim:y tim:z.\n\n'
|
|
202
|
+
result: '@prefix : </write-only.ttl#>.\n\n</a> </b> </c>.\n\n</d> </e> </f>.\n\n</x> </y> </z>.\n\n'
|
|
193
203
|
}))
|
|
194
204
|
|
|
195
205
|
describe('on a resource with parent folders that do not exist', describePatch({
|
|
@@ -200,7 +210,8 @@ describe('PATCH through text/n3', () => {
|
|
|
200
210
|
}, {
|
|
201
211
|
status: 201,
|
|
202
212
|
text: 'Patch applied successfully',
|
|
203
|
-
result: '@prefix : <#>.\n@prefix fol: <./>.\n\nfol:x fol:y fol:z.\n\n'
|
|
213
|
+
// result: '@prefix : <#>.\n@prefix fol: <./>.\n\nfol:x fol:y fol:z.\n\n'
|
|
214
|
+
result: '@prefix : <#>.\n\n<x> <y> <z>.\n\n'
|
|
204
215
|
}))
|
|
205
216
|
})
|
|
206
217
|
|
|
@@ -258,7 +269,8 @@ describe('PATCH through text/n3', () => {
|
|
|
258
269
|
}, { // expected:
|
|
259
270
|
status: 200,
|
|
260
271
|
text: 'Patch applied successfully',
|
|
261
|
-
result: '@prefix : </read-append.ttl#>.\n@prefix tim: </>.\n\ntim:a tim:b tim:c; tim:y tim:z.\n\ntim:d tim:e tim:f.\n\n'
|
|
272
|
+
// result: '@prefix : </read-append.ttl#>.\n@prefix tim: </>.\n\ntim:a tim:b tim:c; tim:y tim:z.\n\ntim:d tim:e tim:f.\n\n'
|
|
273
|
+
result: '@prefix : </read-append.ttl#>.\n\n</a> </b> </c>; </y> </z>.\n\n</d> </e> </f>.\n\n'
|
|
262
274
|
}))
|
|
263
275
|
|
|
264
276
|
describe('with a non-matching WHERE clause', describePatch({
|
|
@@ -281,7 +293,8 @@ describe('PATCH through text/n3', () => {
|
|
|
281
293
|
}, { // expected:
|
|
282
294
|
status: 200,
|
|
283
295
|
text: 'Patch applied successfully',
|
|
284
|
-
result: '@prefix : </read-write.ttl#>.\n@prefix tim: </>.\n\ntim:a tim:b tim:c; tim:y tim:z.\n\ntim:d tim:e tim:f.\n\n'
|
|
296
|
+
// result: '@prefix : </read-write.ttl#>.\n@prefix tim: </>.\n\ntim:a tim:b tim:c; tim:y tim:z.\n\ntim:d tim:e tim:f.\n\n'
|
|
297
|
+
result: '@prefix : </read-write.ttl#>.\n\n</a> </b> </c>; </y> </z>.\n\n</d> </e> </f>.\n\n'
|
|
285
298
|
}))
|
|
286
299
|
|
|
287
300
|
describe('with a non-matching WHERE clause', describePatch({
|
|
@@ -354,7 +367,8 @@ describe('PATCH through text/n3', () => {
|
|
|
354
367
|
}, { // expected:
|
|
355
368
|
status: 200,
|
|
356
369
|
text: 'Patch applied successfully',
|
|
357
|
-
result: '@prefix : </read-write.ttl#>.\n@prefix tim: </>.\n\ntim:d tim:e tim:f.\n\n'
|
|
370
|
+
// result: '@prefix : </read-write.ttl#>.\n@prefix tim: </>.\n\ntim:d tim:e tim:f.\n\n'
|
|
371
|
+
result: '@prefix : </read-write.ttl#>.\n\n</d> </e> </f>.\n\n'
|
|
358
372
|
}))
|
|
359
373
|
|
|
360
374
|
describe('with a patch for non-existing data', describePatch({
|
|
@@ -374,7 +388,8 @@ describe('PATCH through text/n3', () => {
|
|
|
374
388
|
}, { // expected:
|
|
375
389
|
status: 200,
|
|
376
390
|
text: 'Patch applied successfully',
|
|
377
|
-
result: '@prefix : </read-write.ttl#>.\n@prefix tim: </>.\n\ntim:d tim:e tim:f.\n\n'
|
|
391
|
+
// result: '@prefix : </read-write.ttl#>.\n@prefix tim: </>.\n\ntim:d tim:e tim:f.\n\n'
|
|
392
|
+
result: '@prefix : </read-write.ttl#>.\n\n</d> </e> </f>.\n\n'
|
|
378
393
|
}))
|
|
379
394
|
|
|
380
395
|
describe('with a non-matching WHERE clause', describePatch({
|
|
@@ -463,7 +478,8 @@ describe('PATCH through text/n3', () => {
|
|
|
463
478
|
}, { // expected:
|
|
464
479
|
status: 200,
|
|
465
480
|
text: 'Patch applied successfully',
|
|
466
|
-
result: '@prefix : </read-write.ttl#>.\n@prefix tim: </>.\n\ntim:d tim:e tim:f.\n\ntim:x tim:y tim:z.\n\n'
|
|
481
|
+
// result: '@prefix : </read-write.ttl#>.\n@prefix tim: </>.\n\ntim:d tim:e tim:f.\n\ntim:x tim:y tim:z.\n\n'
|
|
482
|
+
result: '@prefix : </read-write.ttl#>.\n\n</d> </e> </f>.\n\n</x> </y> </z>.\n\n'
|
|
467
483
|
}))
|
|
468
484
|
|
|
469
485
|
describe('with a patch for non-existing data', describePatch({
|
|
@@ -485,7 +501,8 @@ describe('PATCH through text/n3', () => {
|
|
|
485
501
|
}, { // expected:
|
|
486
502
|
status: 200,
|
|
487
503
|
text: 'Patch applied successfully',
|
|
488
|
-
result: '@prefix : </read-write.ttl#>.\n@prefix tim: </>.\n\ntim:a tim:y tim:z.\n\ntim:d tim:e tim:f.\n\n'
|
|
504
|
+
// result: '@prefix : </read-write.ttl#>.\n@prefix tim: </>.\n\ntim:a tim:y tim:z.\n\ntim:d tim:e tim:f.\n\n'
|
|
505
|
+
result: '@prefix : </read-write.ttl#>.\n\n</a> </y> </z>.\n\n</d> </e> </f>.\n\n'
|
|
489
506
|
}))
|
|
490
507
|
|
|
491
508
|
describe('with a non-matching WHERE clause', describePatch({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"redirect_uris":["https://localhost:3457/api/oidc/rp/https%3A%2F%2Flocalhost%3A3457"],"client_id":"
|
|
1
|
+
{"redirect_uris":["https://localhost:3457/api/oidc/rp/https%3A%2F%2Flocalhost%3A3457"],"client_id":"c1c49f6ff9e9631cf4c7018f962d2aae","client_secret":"1343de7dc602610de610f34b242d3a96","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"]}
|