mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
chore: Add caching to all authorization steps
This commit is contained in:
parent
2d54493485
commit
59e64a22ea
@ -2,8 +2,11 @@
|
|||||||
"@context": "https://linkedsoftwaredependencies.org/bundles/npm/@solid/community-server/^5.0.0/components/context.jsonld",
|
"@context": "https://linkedsoftwaredependencies.org/bundles/npm/@solid/community-server/^5.0.0/components/context.jsonld",
|
||||||
"@graph": [
|
"@graph": [
|
||||||
{
|
{
|
||||||
"comment": "Supports DPoP and Bearer access tokens, or no credentials.",
|
"comment": "Caches the credentials based on the incoming request.",
|
||||||
"@id": "urn:solid-server:default:CredentialsExtractor",
|
"@id": "urn:solid-server:default:CredentialsExtractor",
|
||||||
|
"@type": "CachedHandler",
|
||||||
|
"source": {
|
||||||
|
"comment": "Supports DPoP and Bearer access tokens, or no credentials.",
|
||||||
"@type": "UnionCredentialsExtractor",
|
"@type": "UnionCredentialsExtractor",
|
||||||
"extractors": [
|
"extractors": [
|
||||||
{
|
{
|
||||||
@ -22,5 +25,6 @@
|
|||||||
{ "@type": "PublicCredentialsExtractor" }
|
{ "@type": "PublicCredentialsExtractor" }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -5,8 +5,12 @@
|
|||||||
],
|
],
|
||||||
"@graph": [
|
"@graph": [
|
||||||
{
|
{
|
||||||
"comment": "Requests permissions on subject resources for auxiliary resources.",
|
"comment": "Caches permissions based on credentials and requested modes. Does not cache the input object itself as that object might be created in different places",
|
||||||
"@id": "urn:solid-server:default:PermissionReader",
|
"@id": "urn:solid-server:default:PermissionReader",
|
||||||
|
"@type": "CachedHandler",
|
||||||
|
"fields": [ "credentials", "requestedModes" ],
|
||||||
|
"source": {
|
||||||
|
"comment": "Requests permissions on subject resources for auxiliary resources.",
|
||||||
"@type": "AuxiliaryReader",
|
"@type": "AuxiliaryReader",
|
||||||
"auxiliaryStrategy": { "@id": "urn:solid-server:default:AuxiliaryStrategy" },
|
"auxiliaryStrategy": { "@id": "urn:solid-server:default:AuxiliaryStrategy" },
|
||||||
"reader": {
|
"reader": {
|
||||||
@ -40,5 +44,6 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -2,12 +2,16 @@
|
|||||||
"@context": "https://linkedsoftwaredependencies.org/bundles/npm/@solid/community-server/^5.0.0/components/context.jsonld",
|
"@context": "https://linkedsoftwaredependencies.org/bundles/npm/@solid/community-server/^5.0.0/components/context.jsonld",
|
||||||
"@graph": [
|
"@graph": [
|
||||||
{
|
{
|
||||||
"comment": "Checks if an operation on a resource requires permissions on intermediate resources (such as newly created parent containers).",
|
"comment": "Caches the requested modes based on the incoming operation.",
|
||||||
"@id": "urn:solid-server:default:ModesExtractor",
|
"@id": "urn:solid-server:default:ModesExtractor",
|
||||||
|
"@type": "CachedHandler",
|
||||||
|
"source" : {
|
||||||
|
"comment": "Checks if an operation on a resource requires permissions on intermediate resources (such as newly created parent containers).",
|
||||||
"@type": "IntermediateCreateExtractor",
|
"@type": "IntermediateCreateExtractor",
|
||||||
"resourceSet": { "@id": "urn:solid-server:default:CachedResourceSet" },
|
"resourceSet": { "@id": "urn:solid-server:default:CachedResourceSet" },
|
||||||
"strategy": { "@id": "urn:solid-server:default:IdentifierStrategy" },
|
"strategy": { "@id": "urn:solid-server:default:IdentifierStrategy" },
|
||||||
"source": { "@id": "urn:solid-server:default:HttpModesExtractor" }
|
"source": { "@id": "urn:solid-server:default:HttpModesExtractor" },
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"comment": "Determines required modes based on HTTP methods.",
|
"comment": "Determines required modes based on HTTP methods.",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user