@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

AccessGrant | AccessRequest

Returns#

AccessGrantWrapper

Defined in#

src/common/getters.ts:244

Properties#

vc#

Private vc: AccessGrant | AccessRequest

Defined in#

src/common/getters.ts:242

Methods#

getAccessModes#

getAccessModes(): AccessModes

Returns#

AccessModes

Defined in#

src/common/getters.ts:260


getExpirationDate#

getExpirationDate(): undefined | Date

Returns#

undefined | Date

Defined in#

src/common/getters.ts:276


getId#

getId(): string

Returns#

string

Defined in#

src/common/getters.ts:264


getInherit#

getInherit(): boolean

Returns#

boolean

Defined in#

src/common/getters.ts:284


getIssuanceDate#

getIssuanceDate(): Date

Returns#

Date

Defined in#

src/common/getters.ts:272


getIssuer#

getIssuer(): string

Returns#

string

Defined in#

src/common/getters.ts:280


getRequestor#

getRequestor(): string

Returns#

string

Defined in#

src/common/getters.ts:256


getResourceOwner#

getResourceOwner(): undefined | string

Returns#

undefined | string

Defined in#

src/common/getters.ts:252


getResources#

getResources(): string[]

Returns#

string[]

Defined in#

src/common/getters.ts:248


getTypes#

getTypes(): string[]

Returns#

string[]

Defined in#

src/common/getters.ts:268