mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
feat: Add required ACP headers
This commit is contained in:
@@ -118,4 +118,21 @@ describe.each(stores)('An LDP handler with ACP using %s', (name, { storeConfig,
|
||||
response = await fetch(baseUrl);
|
||||
expect(response.status).toBe(200);
|
||||
});
|
||||
|
||||
it('returns the required Link headers.', async(): Promise<void> => {
|
||||
const baseAcr = joinUrl(baseUrl, '.acr');
|
||||
const response = await fetch(baseAcr, { method: 'OPTIONS' });
|
||||
const linkHeaders = response.headers.get('link');
|
||||
expect(linkHeaders).toContain('<http://www.w3.org/ns/solid/acp#AccessControlResource>; rel="type"');
|
||||
|
||||
expect(linkHeaders).toContain('<http://www.w3.org/ns/auth/acl#Read>; rel="http://www.w3.org/ns/solid/acp#grant"');
|
||||
expect(linkHeaders).toContain('<http://www.w3.org/ns/auth/acl#Append>; rel="http://www.w3.org/ns/solid/acp#grant"');
|
||||
expect(linkHeaders).toContain('<http://www.w3.org/ns/auth/acl#Write>; rel="http://www.w3.org/ns/solid/acp#grant"');
|
||||
expect(linkHeaders).toContain('<http://www.w3.org/ns/auth/acl#Control>; rel="http://www.w3.org/ns/solid/acp#grant"');
|
||||
|
||||
expect(linkHeaders).toContain('<http://www.w3.org/ns/solid/acp#target>; rel="http://www.w3.org/ns/solid/acp#attribute"');
|
||||
expect(linkHeaders).toContain('<http://www.w3.org/ns/solid/acp#agent>; rel="http://www.w3.org/ns/solid/acp#attribute"');
|
||||
expect(linkHeaders).toContain('<http://www.w3.org/ns/solid/acp#client>; rel="http://www.w3.org/ns/solid/acp#attribute"');
|
||||
expect(linkHeaders).toContain('<http://www.w3.org/ns/solid/acp#issuer>; rel="http://www.w3.org/ns/solid/acp#attribute"');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -4,20 +4,24 @@
|
||||
"css:config/app/main/default.json",
|
||||
"css:config/app/init/default.json",
|
||||
"css:config/app/setup/disabled.json",
|
||||
|
||||
"css:config/http/handler/simple.json",
|
||||
"css:config/http/middleware/no-websockets.json",
|
||||
"css:config/http/server-factory/no-websockets.json",
|
||||
"css:config/http/static/default.json",
|
||||
"css:config/identity/access/public.json",
|
||||
|
||||
"css:config/identity/handler/default.json",
|
||||
"css:config/identity/ownership/token.json",
|
||||
"css:config/identity/pod/static.json",
|
||||
|
||||
"css:config/ldp/authentication/debug-auth-header.json",
|
||||
"css:config/ldp/authorization/acp.json",
|
||||
"css:config/ldp/handler/default.json",
|
||||
"css:config/ldp/metadata-parser/default.json",
|
||||
"css:config/ldp/metadata-writer/default.json",
|
||||
"css:config/ldp/modes/default.json",
|
||||
|
||||
"css:config/storage/key-value/memory.json",
|
||||
"css:config/storage/middleware/default.json",
|
||||
"css:config/util/auxiliary/acr.json",
|
||||
@@ -30,7 +34,7 @@
|
||||
],
|
||||
"@graph": [
|
||||
{
|
||||
"comment": "An HTTP server with only the LDP handler as HttpHandler and an unsecure authenticator.",
|
||||
"comment": "An HTTP server with only the LDP handler as HttpHandler and an unsecure authenticator using ACP.",
|
||||
"@id": "urn:solid-server:test:Instances",
|
||||
"@type": "RecordObject",
|
||||
"record": [
|
||||
|
||||
Reference in New Issue
Block a user