@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 and ODRL.

Example

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

Constructors#

constructor#

new AccessGrantWrapper(vc)

Parameters#

Name

Type

vc

AccessGrant | AccessRequest

Defined in#

src/common/getters.ts:268

Properties#

vc#

Private vc: AccessGrant | AccessRequest

Defined in#

src/common/getters.ts:266

Methods#

getAccessModes#

getAccessModes(): AccessModes

Returns#

AccessModes

Defined in#

src/common/getters.ts:284


getExpirationDate#

getExpirationDate(): undefined | Date

Returns#

undefined | Date

Defined in#

src/common/getters.ts:300


getId#

getId(): string

Returns#

string

Defined in#

src/common/getters.ts:288


getInherit#

getInherit(): boolean

Returns#

boolean

Defined in#

src/common/getters.ts:308


getIssuanceDate#

getIssuanceDate(): Date

Returns#

Date

Defined in#

src/common/getters.ts:296


getIssuer#

getIssuer(): string

Returns#

string

Defined in#

src/common/getters.ts:304


getRequestor#

getRequestor(): string

Returns#

string

Defined in#

src/common/getters.ts:280


getResourceOwner#

getResourceOwner(): undefined | string

Returns#

undefined | string

Defined in#

src/common/getters.ts:276


getResources#

getResources(): string[]

Returns#

string[]

Defined in#

src/common/getters.ts:272


getTypes#

getTypes(): string[]

Returns#

string[]

Defined in#

src/common/getters.ts:292