@digitalbazaar/ezcap-express 7.1.0 → 7.3.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.
- package/LICENSE +1 -2
- package/README.md +8 -6
- package/lib/authorize.js +1 -1
- package/lib/helpers.js +2 -2
- package/lib/index.js +1 -1
- package/lib/revoke.js +3 -5
- package/package.json +22 -26
package/LICENSE
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
BSD 3-Clause License
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2021, Digital Bazaar, Inc.
|
|
4
|
-
All rights reserved.
|
|
3
|
+
Copyright (c) 2021-2026, Digital Bazaar, Inc.
|
|
5
4
|
|
|
6
5
|
Redistribution and use in source and binary forms, with or without
|
|
7
6
|
modification, are permitted provided that the following conditions are met:
|
package/README.md
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
# ezcap express library (@digitalbazaar/ezcap-express)
|
|
2
2
|
|
|
3
|
-
[](https://github.com/digitalbazaar/ezcap-express/actions?query=workflow%3A%22Node.js+CI%22)
|
|
4
|
-
|
|
5
3
|
> zcap's gettin' you down? Get on the Ezcap Express! Woot WOoot! 🚇🎉
|
|
6
4
|
|
|
7
5
|
Connect middleware that provides easy Authorization Capability (zcap) support
|
|
@@ -37,8 +35,12 @@ preferably via parties other than the implementer.
|
|
|
37
35
|
|
|
38
36
|
## Install
|
|
39
37
|
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
This software requires and supports maintained recent versions of Node.js and
|
|
39
|
+
browsers. Updates may remove support for older unmaintained platform versions.
|
|
40
|
+
Please use dependency version lock files and testing to ensure compatibility
|
|
41
|
+
with this software.
|
|
42
|
+
|
|
43
|
+
- [Web Crypto API][] is required. Use a polyfill if needed.
|
|
42
44
|
|
|
43
45
|
To install from NPM:
|
|
44
46
|
|
|
@@ -219,7 +221,7 @@ These are the two assumptions that ezcap makes and with those two assumptions,
|
|
|
219
221
|
<dt><a href="#authorizeZcapRevocation">authorizeZcapRevocation(options)</a> ⇒ <code>function</code></dt>
|
|
220
222
|
<dd><p>Authorizes a request to submit a zcap revocation.</p>
|
|
221
223
|
<p>This middleware is opinionated; it MUST be attached to an endpoint that
|
|
222
|
-
terminates in <code>/zcaps/revocations/:revocationId</code>. This to enable the
|
|
224
|
+
terminates in <code>/zcaps/revocations/:revocationId</code>. This is to enable the
|
|
223
225
|
middleware to automatically generate expected values for running zcap checks
|
|
224
226
|
and to support a common, conventional revocation API pattern.</p>
|
|
225
227
|
<p>The pattern is in support of controlled objects on a service, aka
|
|
@@ -319,7 +321,7 @@ Authorizes an incoming request.
|
|
|
319
321
|
Authorizes a request to submit a zcap revocation.
|
|
320
322
|
|
|
321
323
|
This middleware is opinionated; it MUST be attached to an endpoint that
|
|
322
|
-
terminates in `/zcaps/revocations/:revocationId`. This to enable the
|
|
324
|
+
terminates in `/zcaps/revocations/:revocationId`. This is to enable the
|
|
323
325
|
middleware to automatically generate expected values for running zcap checks
|
|
324
326
|
and to support a common, conventional revocation API pattern.
|
|
325
327
|
|
package/lib/authorize.js
CHANGED
package/lib/helpers.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Copyright (c) 2021-
|
|
2
|
+
* Copyright (c) 2021-2026 Digital Bazaar, Inc.
|
|
3
3
|
*/
|
|
4
4
|
import * as helpers from './helpers.js';
|
|
5
5
|
import {
|
|
@@ -161,7 +161,7 @@ export function createRootCapabilityLoader({
|
|
|
161
161
|
return {
|
|
162
162
|
contextUrl: null,
|
|
163
163
|
documentUrl: url,
|
|
164
|
-
document
|
|
164
|
+
document
|
|
165
165
|
};
|
|
166
166
|
}
|
|
167
167
|
return documentLoader(...args);
|
package/lib/index.js
CHANGED
package/lib/revoke.js
CHANGED
|
@@ -1,20 +1,18 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Copyright (c) 2021-
|
|
2
|
+
* Copyright (c) 2021-2026 Digital Bazaar, Inc.
|
|
3
3
|
*/
|
|
4
4
|
import * as helpers from './helpers.js';
|
|
5
5
|
import assert from 'assert-plus';
|
|
6
6
|
import asyncHandler from 'express-async-handler';
|
|
7
7
|
import {authorizeZcapInvocationAfterParse} from './authorize.js';
|
|
8
8
|
import {CapabilityDelegation} from '@digitalbazaar/zcap';
|
|
9
|
-
import
|
|
10
|
-
const require = createRequire(import.meta.url);
|
|
11
|
-
const jsigs = require('jsonld-signatures');
|
|
9
|
+
import jsigs from 'jsonld-signatures';
|
|
12
10
|
|
|
13
11
|
/**
|
|
14
12
|
* Authorizes a request to submit a zcap revocation.
|
|
15
13
|
*
|
|
16
14
|
* This middleware is opinionated; it MUST be attached to an endpoint that
|
|
17
|
-
* terminates in `/zcaps/revocations/:revocationId`. This to enable the
|
|
15
|
+
* terminates in `/zcaps/revocations/:revocationId`. This is to enable the
|
|
18
16
|
* middleware to automatically generate expected values for running zcap checks
|
|
19
17
|
* and to support a common, conventional revocation API pattern.
|
|
20
18
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@digitalbazaar/ezcap-express",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.3.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": "./lib/index.js",
|
|
6
6
|
"files": [
|
|
@@ -25,38 +25,34 @@
|
|
|
25
25
|
"lint": "eslint ."
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@digitalbazaar/http-digest-header": "^2.
|
|
29
|
-
"@digitalbazaar/http-signature-header": "^5.0.
|
|
30
|
-
"@digitalbazaar/http-signature-zcap-verify": "^11.1
|
|
31
|
-
"@digitalbazaar/zcap": "^9.0.
|
|
28
|
+
"@digitalbazaar/http-digest-header": "^2.3.0",
|
|
29
|
+
"@digitalbazaar/http-signature-header": "^5.0.1",
|
|
30
|
+
"@digitalbazaar/http-signature-zcap-verify": "^11.2.1",
|
|
31
|
+
"@digitalbazaar/zcap": "^9.0.2",
|
|
32
32
|
"assert-plus": "^1.0.0",
|
|
33
33
|
"express-async-handler": "^1.2.0",
|
|
34
|
-
"jsonld-signatures": "^11.
|
|
34
|
+
"jsonld-signatures": "^11.6.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@digitalbazaar/did-method-key": "^3.0
|
|
38
|
-
"@digitalbazaar/ed25519-
|
|
39
|
-
"@digitalbazaar/ed25519-
|
|
40
|
-
"@digitalbazaar/
|
|
41
|
-
"@digitalbazaar/
|
|
42
|
-
"@digitalbazaar/http-
|
|
43
|
-
"@digitalbazaar/
|
|
37
|
+
"@digitalbazaar/did-method-key": "^5.3.0",
|
|
38
|
+
"@digitalbazaar/ed25519-multikey": "^1.3.1",
|
|
39
|
+
"@digitalbazaar/ed25519-signature-2020": "^5.4.0",
|
|
40
|
+
"@digitalbazaar/eslint-config": "^9.0.0",
|
|
41
|
+
"@digitalbazaar/ezcap": "4.4",
|
|
42
|
+
"@digitalbazaar/http-client": "^4.4.0",
|
|
43
|
+
"@digitalbazaar/http-signature-zcap-invoke": "^6.1.0",
|
|
44
|
+
"@digitalbazaar/security-document-loader": "^3.2.0",
|
|
44
45
|
"bnid": "^3.0.0",
|
|
45
|
-
"c8": "^
|
|
46
|
-
"chai": "^4.
|
|
47
|
-
"cross-env": "^
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"eslint-plugin-unicorn": "^44.0.2",
|
|
53
|
-
"express": "^4.18.1",
|
|
54
|
-
"isomorphic-webcrypto": "^2.3.8",
|
|
55
|
-
"jsdoc-to-markdown": "^7.1.1",
|
|
56
|
-
"mocha": "^10.0.0"
|
|
46
|
+
"c8": "^12.0.0",
|
|
47
|
+
"chai": "^4.5.0",
|
|
48
|
+
"cross-env": "^10.1.0",
|
|
49
|
+
"eslint": "^10.10.0",
|
|
50
|
+
"express": "^4.22.3",
|
|
51
|
+
"jsdoc-to-markdown": "^9.1.3",
|
|
52
|
+
"mocha": "^12.0.1"
|
|
57
53
|
},
|
|
58
54
|
"engines": {
|
|
59
|
-
"node": ">=
|
|
55
|
+
"node": ">=22"
|
|
60
56
|
},
|
|
61
57
|
"c8": {
|
|
62
58
|
"reporter": [
|