@digitalbazaar/ezcap-express 7.0.0 → 7.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.
- package/README.md +1 -1
- package/lib/authorize.js +1 -1
- package/lib/helpers.js +2 -2
- package/lib/revoke.js +3 -5
- package/package.json +22 -24
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# ezcap express library (@digitalbazaar/ezcap-express)
|
|
2
2
|
|
|
3
|
-
[](https://github.com/digitalbazaar/ezcap-express/actions/workflows/main.yaml)
|
|
4
4
|
|
|
5
5
|
> zcap's gettin' you down? Get on the Ezcap Express! Woot WOoot! 🚇🎉
|
|
6
6
|
|
package/lib/authorize.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Copyright (c) 2021-2022 Digital Bazaar, Inc. All rights reserved.
|
|
3
3
|
*/
|
|
4
|
+
import * as helpers from './helpers.js';
|
|
4
5
|
import assert from 'assert-plus';
|
|
5
6
|
import asyncHandler from 'express-async-handler';
|
|
6
|
-
import * as helpers from './helpers.js';
|
|
7
7
|
import {verifyCapabilityInvocation} from
|
|
8
8
|
'@digitalbazaar/http-signature-zcap-verify';
|
|
9
9
|
|
package/lib/helpers.js
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
* Copyright (c) 2021-2022 Digital Bazaar, Inc. All rights reserved.
|
|
3
3
|
*/
|
|
4
4
|
import * as helpers from './helpers.js';
|
|
5
|
-
import assert from 'assert-plus';
|
|
6
|
-
import asyncHandler from 'express-async-handler';
|
|
7
5
|
import {
|
|
8
6
|
createRootCapability,
|
|
9
7
|
constants as zcapConstants
|
|
10
8
|
} from '@digitalbazaar/zcap';
|
|
9
|
+
import assert from 'assert-plus';
|
|
10
|
+
import asyncHandler from 'express-async-handler';
|
|
11
11
|
import {parseSignatureHeader} from '@digitalbazaar/http-signature-header';
|
|
12
12
|
import {verifyHeaderValue} from '@digitalbazaar/http-digest-header';
|
|
13
13
|
|
package/lib/revoke.js
CHANGED
|
@@ -1,20 +1,18 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Copyright (c) 2021-
|
|
2
|
+
* Copyright (c) 2021-2025 Digital Bazaar, Inc. All rights reserved.
|
|
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.2.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": "./lib/index.js",
|
|
6
6
|
"files": [
|
|
@@ -26,37 +26,35 @@
|
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@digitalbazaar/http-digest-header": "^2.0.0",
|
|
29
|
-
"@digitalbazaar/http-signature-header": "^5.0.
|
|
30
|
-
"@digitalbazaar/http-signature-zcap-verify": "^11.
|
|
31
|
-
"@digitalbazaar/zcap": "^
|
|
29
|
+
"@digitalbazaar/http-signature-header": "^5.0.1",
|
|
30
|
+
"@digitalbazaar/http-signature-zcap-verify": "^11.1.1",
|
|
31
|
+
"@digitalbazaar/zcap": "^9.0.1",
|
|
32
32
|
"assert-plus": "^1.0.0",
|
|
33
33
|
"express-async-handler": "^1.2.0",
|
|
34
|
-
"jsonld-signatures": "^
|
|
34
|
+
"jsonld-signatures": "^11.5.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@digitalbazaar/did-method-key": "^3.0
|
|
38
|
-
"@digitalbazaar/ed25519-
|
|
39
|
-
"@digitalbazaar/ed25519-
|
|
40
|
-
"@digitalbazaar/ezcap": "^
|
|
41
|
-
"@digitalbazaar/http-client": "^
|
|
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/ezcap": "^4.1.0",
|
|
41
|
+
"@digitalbazaar/http-client": "^4.2.0",
|
|
42
42
|
"@digitalbazaar/http-signature-zcap-invoke": "^6.0.0",
|
|
43
|
-
"@digitalbazaar/security-document-loader": "^
|
|
43
|
+
"@digitalbazaar/security-document-loader": "^3.1.0",
|
|
44
44
|
"bnid": "^3.0.0",
|
|
45
|
-
"c8": "^
|
|
46
|
-
"chai": "^4.
|
|
47
|
-
"cross-env": "^
|
|
48
|
-
"
|
|
49
|
-
"eslint": "^
|
|
50
|
-
"eslint-
|
|
51
|
-
"eslint-plugin-
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"jsdoc-to-markdown": "^7.1.1",
|
|
56
|
-
"mocha": "^10.0.0"
|
|
45
|
+
"c8": "^10.1.3",
|
|
46
|
+
"chai": "^4.5.0",
|
|
47
|
+
"cross-env": "^10.0.0",
|
|
48
|
+
"eslint": "^8.57.1",
|
|
49
|
+
"eslint-config-digitalbazaar": "^5.2.0",
|
|
50
|
+
"eslint-plugin-jsdoc": "^51.4.1",
|
|
51
|
+
"eslint-plugin-unicorn": "^56.0.1",
|
|
52
|
+
"express": "^4.21.2",
|
|
53
|
+
"jsdoc-to-markdown": "^9.1.2",
|
|
54
|
+
"mocha": "^11.7.2"
|
|
57
55
|
},
|
|
58
56
|
"engines": {
|
|
59
|
-
"node": ">=
|
|
57
|
+
"node": ">=20"
|
|
60
58
|
},
|
|
61
59
|
"c8": {
|
|
62
60
|
"reporter": [
|