feat: Add required ACP headers

This commit is contained in:
Joachim Van Herwegen
2022-08-19 15:24:53 +02:00
parent f3e7a20800
commit fa1dee573e
8 changed files with 147 additions and 3 deletions

View File

@@ -10,8 +10,18 @@
"@id": "urn:solid-server:default:Middleware",
"@type": "SequenceHandler",
"handlers": [
{ "@id": "urn:solid-server:default:Middleware_Header" },
{ "@id": "urn:solid-server:default:Middleware_Cors" }
{
"comment": "These handlers can be executed in any order.",
"@id": "urn:solid-server:default:ParallelMiddleware",
"@type": "ParallelHandler",
"handlers": [
{ "@id": "urn:solid-server:default:Middleware_Header" }
]
},
{
"comment": "CORS has to be last since it can close the connection.",
"@id": "urn:solid-server:default:Middleware_Cors"
}
]
}
]

View File

@@ -37,6 +37,28 @@
"@type": "SubfolderResourcesGenerator",
"subfolders": [ "acp" ]
},
{
"comment": "Middleware exposes the required ACP headers.",
"@id": "urn:solid-server:default:ParallelMiddleware",
"@type": "ParallelHandler",
"handlers": [{
"@type": "AcpHeaderHandler",
"targetExtractor": { "@id": "urn:solid-server:default:TargetExtractor" },
"strategy": { "@id": "urn:solid-server:default:AcrIdentifierStrategy" },
"modes": [
"http://www.w3.org/ns/auth/acl#Read",
"http://www.w3.org/ns/auth/acl#Append",
"http://www.w3.org/ns/auth/acl#Write",
"http://www.w3.org/ns/auth/acl#Control"
],
"attributes": [
"http://www.w3.org/ns/solid/acp#target",
"http://www.w3.org/ns/solid/acp#agent",
"http://www.w3.org/ns/solid/acp#client",
"http://www.w3.org/ns/solid/acp#issuer"
]
}]
},
{
"comment": "In case of ACP authorization the ACR resources determine authorization.",
"@id": "urn:solid-server:default:AuthResourceHttpHandler",