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.

Hierarchy

Constructors

Properties

acrStore: ResourceStore
acrStrategy: AuxiliaryStrategy
identifierStrategy: IdentifierStrategy
logger: Logger = ...

Methods

  • Checks if the input can be handled by this class. If it cannot handle the input, rejects with an error explaining why.

    Parameters

    Returns Promise<void>

    A promise resolving if the input can be handled, rejecting with an Error if not.

  • Generates the allowed permissions.

    Parameters

    • target: ResourceIdentifier

      Target to generate permissions for.

    • credentials: Credentials

      Credentials that are trying to access the resource.

    • resourceCache: IdentifierMap<IAccessControlledResource[]>

      Cache used to store ACR data.

    Returns Promise<Partial<Record<AccessMode, boolean>>>

  • Returns the data found in the ACR corresponding to the given identifier.

    Parameters

    Returns Promise<Store<Quad, Quad, Quad, Quad>>