Options
All
  • Public
  • Public/Protected
  • All
Menu

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

Index

Constructors

constructor

Properties

Private Readonly cache

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

Private Readonly converter

Private Readonly expiration

expiration: number

Methods

canHandle

  • 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.

Private fetchCachedQuads

  • fetchCachedQuads(url: string): Promise<Store<Quad, Quad, Quad, Quad>>

handle

handleSafe

Private isMemberOfGroup

  • isMemberOfGroup(webId: string, group: Term): Promise<boolean>
  • Checks if the given agent is member of a 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>

    If the agent is member of the given vCard group.