@inrupt/solid-client-access-grants / common/getters / AccessGrantWrapper

Class: AccessGrantWrapper#

common/getters.AccessGrantWrapper

This class wraps all the accessor functions on a raw Access Grant JSON object. It wraps all the supported Access Grants data models, namely GConsent.

Example

const rawGrant = await getAccessGrantFromRedirectUrl(someUrl, { fetch: session.fetch });
const grant = new AccessGrant(grant);
const grantOwner = grant.getResourceOwner();

Constructors#

constructor#

new AccessGrantWrapper(vc): AccessGrantWrapper

Parameters#

Name

Type

vc

DatasetWithId

Returns#

AccessGrantWrapper

Defined in#

src/common/getters.ts:426

Properties#

vc#

Private vc: DatasetWithId

Defined in#

src/common/getters.ts:424

Methods#

getAccessModes#

getAccessModes(): AccessModes

Returns#

AccessModes

Defined in#

src/common/getters.ts:450


getExpirationDate#

getExpirationDate(): undefined | Date

Returns#

undefined | Date

Defined in#

src/common/getters.ts:466


getId#

getId(): string

Returns#

string

Defined in#

src/common/getters.ts:454


getInbox#

getInbox(): undefined | string

Returns#

undefined | string

Defined in#

src/common/getters.ts:434


getInherit#

getInherit(): boolean

Returns#

boolean

Defined in#

src/common/getters.ts:474


getIssuanceDate#

getIssuanceDate(): Date

Returns#

Date

Defined in#

src/common/getters.ts:462


getIssuer#

getIssuer(): string

Returns#

string

Defined in#

src/common/getters.ts:470


getPurposes#

getPurposes(): string[]

Returns#

string[]

Defined in#

src/common/getters.ts:430


getRequestor#

getRequestor(): string

Returns#

string

Defined in#

src/common/getters.ts:446


getResourceOwner#

getResourceOwner(): undefined | string

Returns#

undefined | string

Defined in#

src/common/getters.ts:442


getResources#

getResources(): string[]

Returns#

string[]

Defined in#

src/common/getters.ts:438


getTypes#

getTypes(): string[]

Returns#

string[]

Defined in#

src/common/getters.ts:458