@inrupt/solid-client-access-grants / common/getters
Module: common/getters#
Classes#
Functions#
getAccessModes#
▸ getAccessModes(vc
): AccessModes
Get the access modes granted to a resources via an Access Grant/Request.
Parameters#
Name |
Type |
Description |
---|---|---|
|
|
The Access Grant/Request |
Returns#
The access modes the grant recipient can exercise.
Example
const modes = getAccessModes(accessGrant);
Defined in#
src/common/getters.ts:118
getExpirationDate#
▸ getExpirationDate(vc
): Date
| undefined
Get the expiration date of an Access Grant/Request.
Parameters#
Name |
Type |
Description |
---|---|---|
|
|
The Access Grant/Request |
Returns#
Date
| undefined
The expiration date
Example
const date = getExpirationDate(accessGrant);
Defined in#
src/common/getters.ts:201
getId#
▸ getId(vc
): string
Get the ID (URL) of an Access Grant/Request.
Parameters#
Name |
Type |
Description |
---|---|---|
|
|
The Access Grant/Request |
Returns#
string
The VC ID URL
Example
const id = getId(accessGrant);
Defined in#
src/common/getters.ts:147
getInherit#
▸ getInherit(vc
): boolean
Check whether a given Access Grant applies recursively to child resources or not.
Parameters#
Name |
Type |
Description |
---|---|---|
|
|
The Access Grant/Request |
Returns#
boolean
true if the Grant applies to contained resources, false otherwise.
Example
const isInherited = getInherit(accessGrant);
Defined in#
src/common/getters.ts:239
getIssuanceDate#
▸ getIssuanceDate(vc
): Date
Get the issuance date of an Access Grant/Request.
Parameters#
Name |
Type |
Description |
---|---|---|
|
|
The Access Grant/Request |
Returns#
Date
The issuance date
Example
const date = getIssuanceDate(accessGrant);
Defined in#
src/common/getters.ts:183
getIssuer#
▸ getIssuer(vc
): string
Get the issuer of an Access Grant/Request.
Parameters#
Name |
Type |
Description |
---|---|---|
|
|
The Access Grant/Request |
Returns#
string
The VC issuer
Example
const date = getIssuer(accessGrant);
Defined in#
src/common/getters.ts:221
getRequestor#
▸ getRequestor(vc
): string
Get the requestor asking for access to a resources with an Access Grant/Request.
Parameters#
Name |
Type |
Description |
---|---|---|
|
|
The Access Grant/Request |
Returns#
string
The requestor WebID
Example
const requestorWebId = getRequestor(accessGrant);
Defined in#
src/common/getters.ts:94
getResourceOwner#
▸ getResourceOwner(vc
): string
Get the resource owner granting access to their resources from an Access Grant/Request.
Parameters#
Name |
Type |
Description |
---|---|---|
|
|
The Access Grant/Request |
Returns#
string
The resource owner WebID
Example
const ownerWebId = getResourceOwner(accessGrant);
Defined in#
src/common/getters.ts:67
▸ getResourceOwner(vc
): string
| undefined
Parameters#
Name |
Type |
---|---|
|
|
Returns#
string
| undefined
Defined in#
src/common/getters.ts:70
getResources#
▸ getResources(vc
): string
[]
Get the resources to which an Access Grant/Request applies.
Parameters#
Name |
Type |
Description |
---|---|---|
|
|
The Access Grant/Request |
Returns#
string
[]
The resources IRIs
Example
const resources = getResources(accessGrant);
Defined in#
src/common/getters.ts:41
getTypes#
▸ getTypes(vc
): string
[]
Get the VC types of an Access Grant/Request.
Parameters#
Name |
Type |
Description |
---|---|---|
|
|
The Access Grant/Request |
Returns#
string
[]
The VC types
Example
const types = getTypes(accessGrant);
Defined in#
src/common/getters.ts:165