Checks if the input data can be handled by this class. Throws an error if it can't handle the data.
Input data that would be handled potentially.
A promise resolving if this input can be handled, rejecting with an Error if not.
Capitalizes the input string.
String to transform.
The capitalized string.
Checks if any of the triples in the store grant the agent permission to use the given mode. Throws a ForbiddenHttpError or UnauthorizedHttpError depending on the credentials if access is not allowed.
Agent that wants access.
A store containing the relevant triples for authorization.
Which mode is requested. Probable one of ('write' | 'read' | 'append' | 'control').
Finds all triples in the data stream of the given representation that use the given predicate and object. Then extracts the unique subjects from those triples, and returns a Store containing all triples from the data stream that have such a subject.
This can be useful for finding the acl:Authorization
objects corresponding to a specific URI
and returning all relevant information on them.
Representation with data stream of internal/quads.
Predicate to match.
Object to match.
A store containing the relevant triples.
Returns the acl triples that are relevant for the given identifier. These can either be from a corresponding acl file or an acl file higher up with defaults. Rethrows any non-NotFoundHttpErrors thrown by the AclManager or ResourceStore.
ResourceIdentifier of which we need the acl triples.
Only used internally for recursion.
A store containing the relevant acl triples.
Checks if an agent is allowed to execute the requested actions. Will throw an error if this is not the case.
Relevant data needed to check if access can be granted.
The data to handle.
The result of the handle function of the handler.
Checks if the given agent has access to the modes specified by the given authorization.
Credentials of agent that needs access.
acl:Authorization that needs to be checked.
A store containing the relevant triples of the authorization.
If the agent has access.
Handles most web access control predicates such as
acl:mode
,acl:agentClass
,acl:agent
,acl:default
andacl:accessTo
. Does not supportacl:agentGroup
,acl:origin
andacl:trustedApp
yet.