Private
Readonly
acrPrivate
Readonly
acrPrivate
Readonly
identifierProtected
Readonly
loggerChecks if the input can be handled by this class. If it cannot handle the input, rejects with an error explaining why.
Input that could potentially be handled.
A promise resolving if the input can be handled, rejecting with an Error if not.
Private
createCreates an ACP context targeting the given identifier with the provided credentials.
Private
extractGenerates the allowed permissions.
Target to generate permissions for.
Credentials that are trying to access the resource.
Cache used to store ACR data.
Private
getReturns the given identifier and all its ancestors. These are all the identifiers that are relevant for determining the effective policies.
Private
getReturns all IPolicy found in resources
that apply to the target identifier.
https://solidproject.org/TR/2022/acp-20220518#effective-policies
Handles the given input. This may only be called if canHandle did not reject. When unconditionally calling both in sequence, consider handleSafe instead.
Input that needs to be handled.
A promise resolving when handling is finished.
Helper function that first runs canHandle followed by handle. Throws the error of canHandle if the data cannot be handled, or returns the result of handle otherwise.
Input data that will be handled if it can be handled.
A promise resolving if the input can be handled, rejecting with an Error if not.
Private
readReturns the data found in the ACR corresponding to the given identifier.
Finds the permissions of a resource as defined in the corresponding ACRs. Implementation based on https://solid.github.io/authorization-panel/acp-specification/.
Caches data so no duplicate calls are made to the ResourceStore for a single request.