Recovers the profile card of a WebID that is hosted in a pod of the requesting account.

Unlike LinkWebIdHandler, this does not need the registration-token flow or a readable profile: the account session proves the ownership of the account and the pod store proves that the WebID is hosted in one of its pods. The resources that pod generation produces for the recovered WebID are then written server-side as they are: the templates are the source of truth. The previous profile document is backed up first. The recovered WebID is the existing link, fragment included.

Hierarchy (view full)

Implements

Constructors

Methods

  • Copies the current card to a unique backup resource, exactly as it is stored. The backup must not depend on the content being readable or parseable: a broken card is the case it exists for. It is a normal resource of the pod, so the pod's authorization applies to it. Returns null if there is no card to back up.

    Parameters

    • cardUrl: string

    Returns Promise<null | string>

  • Generates the pod resources for the given WebID and keeps the ones that belong to the recovered document: the profile document itself and any resource generated next to it, such as <document>.acl for WAC or <document>.acr for ACP deployments.

    Parameters

    • podUrl: string
    • webId: string
    • documentUrl: string

    Returns Promise<Resource[]>