@inrupt/solid-client-access-grants
    Preparing search index...

    Function getCustomFields

    • Reads all the custom fields in the consent section of the provided Access Credential. An empty object will be returned if no custom fields are found.

      Parameters

      • accessCredential: DatasetWithId

        The Access Credential (Access Grant or Access Request)

      Returns Record<string, unknown>

      an object keyed by the custom fields names, associated to their values.

      const accessRequest = await issueAccessRequest({...}, {
      ...,
      customFields: new Set([
      {
      key: new URL("https://example.org/ns/customString"),
      value: "custom value",
      },
      {
      key: new URL("https://example.org/ns/customInteger"),
      value: 1,
      },
      ]),
      });
      const customFields = getCustomFields(accessRequest);
      // s is "custom value"
      const s = customFields["https://example.org/ns/customString"];
      // i is 1
      const i = customFields["https://example.org/ns/custominteger"];

      3.2.0