@digitalbazaar/ezcap-express 6.1.0 → 6.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/revoke.js +3 -4
  2. package/package.json +1 -1
package/lib/revoke.js CHANGED
@@ -192,6 +192,9 @@ function createCheckRevocationMiddleware({
192
192
  return helpers.handleError({res, error, onError});
193
193
  }
194
194
 
195
+ // set capability to be revoked to enable access in other helpers
196
+ req.ezcap.capabilityToRevoke = capability;
197
+
195
198
  // verify CapabilityDelegation
196
199
  let delegator;
197
200
  const capture = {};
@@ -235,10 +238,6 @@ async function _verifyDelegation({
235
238
  // the expected values for the invocation are the same as those for checking
236
239
  // the revocation delegation chain per the reasoning given in notes above
237
240
  const {expectedRootCapability} = req.ezcap;
238
- /* Note: We build the `expectedRootCapability` for the revoked capability
239
- from the capability invocation expected values here. This is ok because the
240
- revocation middleware feature presumes that the only zcaps that may be
241
- revoked using it are rooted in the same authority... FIXME */
242
241
  const {verified, error, results} = await jsigs.verify(capability, {
243
242
  documentLoader,
244
243
  purpose: new CapabilityDelegation({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digitalbazaar/ezcap-express",
3
- "version": "6.1.0",
3
+ "version": "6.2.0",
4
4
  "main": "lib",
5
5
  "module": "main.js",
6
6
  "repository": {