This project adheres to Semantic Versioning.
The following changes are pending, and will be applied on the next major release:
- The
getAccessGrantAllfunction is deprecated. It can be replaced withquery. Although the two functions' behavior is different, they can be used to achieve similar results. - The
gConsentand all ofgConsent/*submodules are deprecated. The former can be replaced by a regular import of the library, and the latter can be replaced with the equivalent non-gConsent submodules (e.g.gConsent/managecan be replaced withmanage). There is no functionality change between the two. - An access request can now be created with URL template values which can be mapped
to absolute URIs when approving an access request via
approveAccessRequest. - For access requests that use templates, the
resourceOwnerrequest parameter is optional.
- Support
gc:isProvidedToalternatives An Access Grant consent has three valid predicates to express the link to the recepient:gc:isProvidedTo,gc:isProvidedToPersonandgc:isProvidedToPerson. The library was making an assumption validating a received Access Grant that onlygc:isProvidedTowas valid. All three are now supported.
4.0.1 - 2025-11-04
This patch release aims at exercising the new release pipeline (see https://github.blog/changelog/2025-09-29-strengthening-npm-security-important-changes-to-authentication-and-token-management/). There are some dev dependencies update which do not impact downstream consumers.
4.0.0 - 2025-10-08
- Support for Node.js v18.x has been dropped as that version has reached end-of-life.
- The link between an Access Request and an Access Grant issued using
approveAccessRequestcan now be verified by the server when setting theverifyLinkedRequestoption totrue. approveAccessRequestandissueAccessGrantnow support an additionalownerparameter in the Access Grant body overrides. Setting this will include a custom resource owner in the Access Grant issuing request. This allows an admin to issue Access Grants on behalf of a user at provisioning time. This parameter will be ignored by the server for sessions that have been activated already.
3.3.1 - 2025-06-12
denyAccessRequestnow links the Access Denial to the incoming Access Request the same wayapproveAccessRequestdoes, so that the request status is updated at the/queryendpoint.
3.3.0 - 2025-04-23
denyAccessRequestsupports a newcustomFieldsoption to add custom fields to the resulting Access Denial. This option behaves the same as thecustomFieldsoption ofapproveAccessRequest.issueAccessGrantis now available as an alternative toapproveAccessRequestwith an undefined request, to issue Access Grants in the case when there is no initial Access Request.
- When issuing an Access Grant from an Access Request using
approveAccessRequest, the resulting Access Request now references the source Access Request. A newgetRequestgetter has been added to get this value from an Access Grant. This will result in thequerymodule no longer showing approved Access Requests as "Pending". - The
queryfunction now supports thetypefilter not being set, which will result in both Access Grants and Access Requests matching the provided filters being returned.
3.2.1 - 2025-01-13
- Passes the v2 of the JSON-LD context for Access Grants when issuing and using the
/deriveendpoint for VC providers supporting it. This allows the server to return all Access Credentials understood by the client, both v1 and v2. Clients prior to this version will issue and retrieve Access Credentials with a v1 context (and will not be able to use features introduced in v2).
- Type declarations have been altered so that internal type declarations are no longer
partially exposed in the type declaration files. This prevents issues with some
frameworks, such as Angular, in particular with
revokeAccessCredentialbeing internal.
3.2.0 - 2024-12-23
- Add support for custom fields. Applications are now able to read and write custom fields
into Access Credentials (both Access Requests and Access Grants). This feature is available
via a new option introduced in
issueAccessRequestandapproveAccessRequestto write the custom fields, and via a set of dedicated getters in thegetters/module. A generic getter is introduced,getCustomFields, as well as a set of typed helpers, such asgetCustomInteger. Typed helpers are available for integers, floats, strings and booleans. - Support new query endpoint: the new
queryfunction enables querying for Access Credentials using the newly introduced ESS endpoint.
3.1.1 - 2024-10-23
- Added support for the
https://schema.inrupt.com/credentials/v2.jsonldJSON-LD context.
3.1.0 - 2024-09-16
- Node 22 is now supported
- The
/resourcesmodule function have their signature now aligned with the underlying@inrupt/solid-clientfunctions. Namely, theoptionsparameter forsaveSolidDatasetAtandgetSolidDatasetsupport additional entries that were already available in@inrupt/solid-client.
3.0.5 - 2024-07-31
- Removed base64url dependency due to potential issues with the browser environment.
- A descriptive error is now thrown when trying to create an access request/approve an access grant for no resources. Note that previously, such call may not have thrown, but it resulted in an Access Grant granting access to nothing, which would have caused confusion when trying to use it.
- The error thrown when the issuer endpoint for an access grant/request cannot be computed is more comprehensive.
3.0.4 - 2024-02-12
- Extend predicate supported by
getRequestor:getRequestornow supports thegc:isProvidedToPersonandgc:isProvidedToControllerpredicates in addition to the currentgc:isProvidedTopredicate.
3.0.3 - 2024-02-06
- Internal function
getConsentis no longer part of the exports, which was causing TS to not build in some setups.
3.0.2 - 2024-01-22
getAccessGrantAllno longer includes duplicates in the result set when using a container filtering by resource.
3.0.1 - 2024-01-10
getAccessGrantAllincorrectly excluded non-recursive grants if not filtering on target resource.
3.0.0 - 2023-12-22
- Parsing Access Grants and Access Requests as RDF from JSON-LD: This allows the Access Grants
and Access Requests to be read using the RDF/JS DatasetCore API. This is a breaking change,
because their type also now extends the
DatasetCoretype. Importantly, this dataset is not preserved when converting a Verifiable Credential to a string and back doingJSON.parse(JSON.stringify(verifiableCredential)). We reccomend that developers setreturnLegacyJsonldtofalsein functions such asgetAccessGrantin order to avoid returning deprecated object properties. Instead developers should make use of the exportedgetterfunctions to get these attributes. - Node 16 is no longer supported: The global
fetchfunction is now used instead of@inrupt/universal-fetch. This means this library now only works with Node 18 and higher. - Deprecated signatures removed:
denyAccessRequestno longer supports theresourceOwnerargument, it must be removed.approveAccessRequestno longer supports theresourceOwnerargument, it must be removed.getAccessGrantAllno longer supports theresourceargument, which should be merged into theparamsargument along the otherAccessParameter.
2.6.2 - 2023-11-16
- Support for
odrlaccess grants has been removed. The ODRL data model was in as an experimental feature, and wasn't deployed in any supported Access Grant issuers. Removing it will not break apps using the currently supported gConsent-based Access Grants.
- Denied Access Grant expiration date: When denying an access grant based on an access request, the exipration date of the access request wasn't being picked up as the expiration date for the denied grant.
2.6.1 - 2023-09-25
denyAccessRequestdidn't normalize the returned denied Access Grant, resulting in it having a JSON-LD frame different from the value returned byapproveAccessRequest. The value is now normalized, and both functions return a similarly shaped object. This also fixes the return type ofdenyAccessRequest, which now returns the more strictAccessGranttype rather than theVerifiableCredentialtype.- add
typesentry in the package.json exports so that bundlers such as esbuild can discover type definitions.
2.6.0 - 2023-09-18
- Export
getAccessGrantAllhas a newstatusparameter which allows selection ofgranted,deniedorallaccess grants. By default onlygrantedaccess grants are returned as this is the existing behavior. In the next major version of this library the default will be to returnallaccess grants.
2.5.0 - 2023-08-11
- Export
CredentialIsAccessGrantAnywhich checks if aVerifiableCredentialis anAccessGrantAny.
2.4.0 - 2023-07-24
deleteSolidDatasetanddeleteFile: Add functions to theresourcemodule to delete resources, following the interface of@inrupt/solid-client.getAccessRequest: a function exported by the./managemodule to get the Access Request from the Access Request URL.
2.3.2 - 2023-06-05
resourcemarked as deprecated forgetAccessGrantAll. It can be optionally passed along withparams.
2.3.1 - 2023-05-24
- Buffer API marked as deprecated for
saveFileInContainerandoverwriteFileInContainer.
- Denied Access Grants now preserve the purpose set in the original Access Request.
2.3.0 - 2023-05-09
- Node 20 support
2.2.0 - 2023-04-14
- Node 18 support
2.1.2 - 2023-02-06
- The JSON-LD/JSON normalization is now applied not only when issuing an Access Request or an Access Grant, but also when dereferencing one.
2.1.1 - 2023-02-01
-
JSON-LD/JSON alignment: We are processing Verifiable Credentials as plain JSON, while they actually are JSON-LD. This creates some discrepancies:
- The Access Grants and Access Requests status is now accepted in its abbreviated form, and not only as a fully qualified IRI, as allowed by the JSON-LD context.
- Arrays containing a single value are also accepted as a literal equal to said single value.
This is a stopgap solution: a proper fix would be to do full JSON-LD parsing, but we aren't doing it for the moment because of issues between existing libraries and our build setup.
2.1.0 - 2023-01-06
- Added the
createContainerInContainermethod. - Added
saveSolidDatasetInContainermethod. - Added the
updateAcrflag to the options that can be included when calling theapproveAccessRequestmethod.updateAcrwill default totrue. Note that this is an advanced feature, and only users having a good understanding of the relationship between Access Grants and ACRs should deviate from the default. Additional information is available in the ESS documentation - Added the
inheritflag toissueAccessRequestandapproveAccessRequestto allow controlling whether the issued Access Grant should apply recursively to the target containers' contained resources. - The
getAccessGrantAllmethod now allows discovering recursive Access Grants issued for an ancestor container.
- The
gettersmodule contains functions and a class to interact with Verifiable Credentials without having to hard-code the data model in your application.
2.0.0 - 2022-11-03
getAccessRequestFromRedirectUrlandgetAccessGrantFromRedirectUrlno longer pick up VC passed by value, and only support passing by IRI. This is for security reasons, as passing a VC by value in the IRI leaks information. This removes a behavior that has been deprecated in v0.5.0. This change doesn't affect you if you are using the query parameters accessors (getAccessRequestFromRedirectUrlandgetAccessGrantFromRedirectUrl).
- The
gettersmodule functions now support ODRL Access Grants. AccessGrantOdrl,AccessGrantGConsentandAccessGrantAnytypes: Both the ODRL-based and the GConsent-based Access Grants now have an explicit associated type. Functions that support both data model may use theAccessGrantAllAnyunion type.gConsentandodrlAPI objects: in order to support a new schema for Access Grants, new functions will be added to the API. They will not be compatible with the current data model, so the new API will be exported via theodrlobject for backwards compatibility. After the current API is deprecated, the default exports will point toodrl.getAccessRequestFromRedirectUrlandgetAccessGrantFromRedirectUrlnow accept URL objects as well as plain strings.approveAccessRequestnow accepts anullexpiration date override, resulting in the expiration date from the Access Request not being applied to the Access Grant.
1.1.0 - 2022-09-02
- Added resource APIs for
overwriteFileandsaveFileInContainer, these compliment the existinggetFilemethod.
- Refactored resource APIs (
getFile,getSolidDataset,saveSolidDatasetAt) and added end-to-end test coverage of these APIs. - Improved jest setup for node & browser unit tests.
- Added a more extensive demo app.
1.0.2 - 2022-06-21
approveAccessRequest,getAccessGrant,getAccessGrantFromRedirectUrlnow accurately return anAccessGrant.getAccessRequestFromRedirectUrlnow accurately return anAccessRequest.
- Fix Node 14 atob/btoa compatibility issue.
- The JSON-LD context of issued VCs was hard-coded, instead of being relative to the issuer domain as mandated by the ESS documentation.
1.0.1 - 2022-06-06
GRANT_VC_URL_PARAM_NAMEis now exported from the base package. This is the name of the parameter used in URL redirects to an access grant management application.
1.0.0 - 2022-06-06
- Release major version of package
0.6.1 - 2022-06-06
- Export all types via Rollup.
- Fix demo application.
- Drop Node 12 support.
0.6.0 - 2022-04-05
getAccessGrantAllsupports a new option,includeExpired. By default, only grants that are still valid are returned by the VC provider. If set to true, grants that have expired will also be included in the response.issueAccessRequestnow generates an access request VC including the resource owner in thehasConsentfield with theisConsentForDataSubjectpredicate. This will enable resource owners to dereference access requests IRIs to their resources.
- When type-checking an Access Grant (e.g. using
getAccessGrant), only accepted Grants were supported. Support for denied Grant has now been added. - When using an Access Grant to get an Access Token, one of the claims from the server response was unaligned with the spec. This inconsistency has been fixed on the server-side with backwards-compatibility, and now on the client side too. This change is transparent to users.
approveAccessRequestwasn't using the default session from@inrupt/solid-client-authn-browserto set the ACR access appropriately, resulting in401 Unauthenticatederrors.getAccessRequestFromRedirectUrlwas deserializing the received VC expecting an URL-encoded value, instead of a base64-encoded value, which is how it is serialized when redirecting the user to the VC management app.
0.5.0 - 2022-03-01
redirectToRequestorhas been added to the./managemodule to help access management apps redirect their users to the clients which requested access to a Resource.getAccessRequestFromRedirectUrl: a function exported by the./managemodule to get the Access Request and requestor redirect URL from the redirect to the Access Management App from the requestor.getAccessGrantFromRedirectUrl: a function exported by the./requestmodule to get the Access Grant from the redirect to the requestor from the Access Management App.
- The JSON-LD context URL has changed from https://vc.inrupt.com/credentials/v1 to https://vc.inrupt.com/credentials/v1.
redirectToAccessManagementUinow returns a promise that never resolves. This prevents fromawaiting on it, have it resolve, and start running code in the undeterministic time between the moment whenwindow.location.hrefis set (or the redirect callback is called) and the moment the redirection actually happens.
approveAccessRequestanddenyAccessRequestno longer requires theresourceOwnerparameter.issueAccessRequestoptions no longer include therequestorfield.
0.4.1 - 2022-01-28
- Some dependencies have been updated to mitigate vulnerabilities.
0.4.0 - 2021-11-30
- Runnable examples are available in
examples/requestorandexamples/grant-access.
Rename APIs to remove the connotations that "consent" could imply. All previous APIs still exist, but are undocumented and deprecated, and will be removed in the future.
- Deprecate
approveAccessRequestWithConsentin favour ofapproveAccessRequest(which now supportspurpose) - Deprecate
requestAccessWithConsentin favour ofissueAccessRequest(which now supportspurpose) - Deprecate
RequestAccessWithConsentParametersin favour ofIssueAccessRequestParameters - Rename type
RequestAccessParameterstoIssueAccessRequestParameters - Rename type
ConsentApiBaseOptionstoAccessBaseOptions - Rename
requestAccesstoissueAccessRequest - Rename
isValidConsentGranttoisValidAccessGrant - Rename
getAccessWithConsenttogetAccessGrant - Rename
getAccessWithConsentAlltogetAccessGrantAll - Rename
revokeAccesstorevokeAccessGrant - Rename
getConsentApiEndpointtogetAccessApiEndpoint - Rename
getConsentManagementUitogetAccessManagementUi - Rename
getConsentManagementUiFromWellKnowntogetAccessManagementUiFromWellKnown - Rename
redirectToConsentManagementUitoredirectToAccessManagementUi - Change
consentEndpointproperty inConsentApiBaseOptions/AccessBaseOptionstoaccessEndpoint(backwards compatible)
Other changes:
- Explicitly document the
IssueAccessRequestParameterstype, such that it doesn't end up on themanagemodule documentation. - Ensure only the exported modules are documented by typedoc, making our documentation clearer to read.
- Fix typo in error message thrown from
getBaseAccessVerifiableCredential - Reduce iterations needed for calculating consent guards (minor performance gain)
getSolidDataset,getFile, andsaveSolidDatasetAthave been implemented as wrappers around their solid-client function calls. These take an access grant and use it to authenticate against a resource.fetchWithVcis a generic function that uses an access grant and returns a pre-authenticatedfetchmethod.
- Approving an Access Request did not update the target resources' ACR, resulting in a useless Access Grant.
- Discovering the verification endpoint was relying on incorrect assumptions, and
failed when calling
isValidConsentGrant. - Specifying an inbox when requesting/granting access is no longer mandatory.
0.3.2 - 2021-10-29
- Looking up access grants for a given resource was issuing incorrect requests.
0.3.1 - 2021-10-21
- The property for access issuer discovery has been aligned with the one used on
the server side, i.e.
http://www.w3.org/ns/solid/terms#accessIssuer. - The discovery for the access issuer no longer relies on the Pod server, but rather on the UMA server.
0.3.0 - 2021-10-15
redirectToConsentManagementUiredirects to the consent management app adding the base-64 encoded VC to the IRI as a query parameter namedrequestVc, instead of the previousrequestVcUrlwhich only contained the VC IRI.
- Fix and re-enable VC type checking.
- Consent endpoint discovery from
.well-known/solidnow supports both the legacy property, and the newsolid:consentone. - The credential subject of a grant is now the resource owner, instead of the requestor. The requestor is still the credential subject of requests.
0.2.1 - 2021-10-12
- An NPM incident made version 0.2.0 uninstallable, and publishing a new version was necessary to resolve the issue.
0.2.0 - 2021-10-11
- The 0.1.0 version had been accidentally released some time ago, creating a conflict. This just bumpts the version number to clean this up.
0.1.0 - 2021-10-11
- The shape of the consent VC obtained when approving a request wasn't valid as per the consent service expectations.
getConsentApiEndpointhad an incorrect assumption about some behaviour ofsolid-client, which resulted in throwing an exception, and was fixed in its version 1.13.1.
getAccessWithConsentlooks up an access grant from its IRI, and performs some validation on it.getSolidDatasetfetches a dataset from a Solid Pod, using an Acces Grant to prove the caller is entitled to access to the target resource.getAccessWithConsentAllenables retrieving all consent grants issued over a specific resource.redirectToConsentManagementUienables discovering a user's preferred consent management app, and redirecting them to it.
0.0.3 - 2021-10-01
- Use complete IRIs as values for VC properties instead of shorthand that are not expanded, and therefore fail shape validation of the consent service.
- Fixes node imports as well as webpack, rollup and parcel builds
0.0.2 - 2021-09-30
- Fixed missing dependencies which failed the build using bundlers such as Webpack or Parcel.
0.0.1 - 2021-09-29
requestAccessandrequestAccessWithConsent: As an entity wanting to access data under a user's control, create an access request. The access request may be associated to an explicit user consent for a given purpose.approveAccessRequestandapproveAccessRequestWithConsent: As a person controlling some data, grant access to an entity to this data, potentially with your explicit consent for a given purpose.cancelAccessRequest: Cancel a pending access request.denyAccessRequest: As a person controlling some data, deny access to an entity to this data.getConsentApiEndpoint: Discover the URL where access requests may be created for a given resource.getConsentManagementUi: Discover the URL of a consent app where a user prefers to be redirected when prompted for consent.isValidConsentGrant: Verify if a consent grant is valid (correct signature, issuer key match...). The verification is done at a remote endpoint, and not client-side.revokeAccess: Revoke a consent grant.