Beta
Private
constructorPrivate
_connectedThe DID to use as the author and default target for the underlying permission request
Private
_messageThe underlying DWN RecordsWrite
message along with encoded data that represent the request
Private
_permissionsThe PermissionsAPI used to interact with the underlying permission request
Private
_requestThe parsed permission request object
Private
agentThe agent to use for this instantiation of the request
The conditions under which the requested grant would be valid
Whether or not the permission request can be used to impersonate the grantor
(optional) Description of the permission request
The request's ID, which is also the underlying record's ID
The RecordsWrite
DWN message with encoded data that was used to instantiate this request
The DID that is requesting a permission
The permission scope under which the requested grant would be valid
Beta
Grants the permission request to the requester.
the date when the permission grant will expire.
if true, the permission grant will be stored in the owner's DWN. Defaults to true.
the granted permission.
Beta
Send the current permission request to a remote DWN by specifying their DID If no DID is specified, the target is assumed to be the owner (connectedDID).
Optional
target: stringthe optional DID to send the permission request to, if none is set it is sent to the connectedDid
the status of the send permission request
the JSON representation of the permission request
Static
parseparses the request given an agent, connectedDid and data encoded records write message
The
PermissionRequest
class encapsulates a permissions protocolrequest
record, providing a more developer-friendly interface for working with Decentralized Web Node (DWN) records.Methods are provided to grant the request and manage the request's lifecycle, including writing to remote DWNs.