Checks if the given WebID belongs to a group that has access. Implements the behaviour of groups from the WAC specification.

Fetched results will be stored in an ExpiringStorage.

Requires a storage that can store JS objects. expiration parameter is how long entries in the cache should be stored in seconds, defaults to 3600.

Hierarchy

Constructors

Properties

cache: ExpiringStorage<string, Promise<Store<Quad, Quad, Quad, Quad>>>
expiration: number

Methods

  • Fetches quads from the given URL. Will cache the values for later re-use.

    Parameters

    • url: string

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

  • Checks if the given agent is member of a given vCard group.

    Returns

    If the agent is member of the given vCard group.

    Parameters

    • webId: string

      WebID of the agent that needs access.

    • group: Term

      URL of the vCard group that needs to be checked.

    Returns Promise<boolean>