@inrupt/solid-client-access-grants / request

Module: request#

Import this module for the access API functions available to an entity requesting access over a resource.

Functions#

cancelAccessRequest#

cancelAccessRequest(vc, options?): Promise<void>

Cancel a request for access to data (with explicit or implicit consent) before the person being asked for access has replied. This is equivalent to revoking a access grant.

Since

0.0.1

Parameters#

Name

Type

Description

vc

string | URL | VerifiableCredential

The access request, either in the form of a VC URL or a full-fledged VC.

options

AccessBaseOptions

Optional properties to customise the access request behaviour.

Returns#

Promise<void>

A void promise

Defined in#

src/request/cancelAccessRequest.ts:37


getAccessGrantFromRedirectUrl#

getAccessGrantFromRedirectUrl(redirectUrl, options?): Promise<AccessGrant>

Get the Access Grant out of the incoming redirect from the Access Management app.

Since

0.5.0

Parameters#

Name

Type

Description

redirectUrl

string | URL

The URL the user has been redirected to from the access management app.

options

Object

Optional properties to customise the behaviour: - fetch: an authenticated fetch function. If not provided, the default session from @inrupt/solid-client-authn-browser will be used if available.

options.fetch?

(input: RequestInfo | URL, init?: RequestInit) => Promise<Response>

-

Returns#

Promise<AccessGrant>

An Access Grant

Defined in#

src/request/getAccessGrantFromRedirectUrl.ts:41


issueAccessRequest#

issueAccessRequest(params, options?): Promise<AccessRequest>

Request access to a given Resource.

Since

0.4.0

Parameters#

Name

Type

Description

params

InputAccessRequestParameters

Access to request.

options?

AccessBaseOptions

Optional properties to customise the access request behaviour.

Returns#

Promise<AccessRequest>

A signed Verifiable Credential representing the access request.

Defined in#

src/request/issueAccessRequest.ts:41

issueAccessRequest(params, options?): Promise<AccessRequest>

Deprecated

Please remove the requestor parameter.

Parameters#

Name

Type

params

DeprecatedAccessRequestParameters

options?

AccessBaseOptions

Returns#

Promise<AccessRequest>

Defined in#

src/request/issueAccessRequest.ts:48