@verii/vc-checks 1.1.0-pre.1759611851 → 1.1.0-pre.1759931450
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/index.js
CHANGED
|
@@ -22,7 +22,7 @@ module.exports = {
|
|
|
22
22
|
...require('./src/check-issuer-trust'),
|
|
23
23
|
...require('./src/verify-primary-source-issuer'),
|
|
24
24
|
...require('./src/check-credential-status'),
|
|
25
|
-
...require('./src/check-
|
|
25
|
+
...require('./src/check-jws-vc-tampering'),
|
|
26
26
|
...require('./src/verify-issuer-for-credential-type'),
|
|
27
27
|
...require('./src/verii-protocol-versions'),
|
|
28
28
|
...require('./src/extract-credential-type'),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@verii/vc-checks",
|
|
3
|
-
"version": "1.1.0-pre.
|
|
3
|
+
"version": "1.1.0-pre.1759931450",
|
|
4
4
|
"description": "Velocity Verifiable credentials checks functions",
|
|
5
5
|
"repository": "https://github.com/LFDT-Verii/core",
|
|
6
6
|
"main": "index.js",
|
|
@@ -17,15 +17,15 @@
|
|
|
17
17
|
"author": "Denis Smalonski",
|
|
18
18
|
"license": "Apache-2.0",
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@verii/did-doc": "1.1.0-pre.
|
|
21
|
-
"@verii/jwt": "1.1.0-pre.
|
|
22
|
-
"@verii/organizations-registry": "1.1.0-pre.
|
|
20
|
+
"@verii/did-doc": "1.1.0-pre.1759931450",
|
|
21
|
+
"@verii/jwt": "1.1.0-pre.1759931450",
|
|
22
|
+
"@verii/organizations-registry": "1.1.0-pre.1759931450",
|
|
23
23
|
"date-fns": "^3.0.0",
|
|
24
24
|
"lodash": "^4.17.21"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@verii/sample-data": "1.1.0-pre.
|
|
28
|
-
"@verii/tests-helpers": "1.1.0-pre.
|
|
27
|
+
"@verii/sample-data": "1.1.0-pre.1759931450",
|
|
28
|
+
"@verii/tests-helpers": "1.1.0-pre.1759931450",
|
|
29
29
|
"eslint": "8.57.1",
|
|
30
30
|
"eslint-config-airbnb-base": "14.2.1",
|
|
31
31
|
"eslint-config-prettier": "8.10.2",
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
"lib"
|
|
44
44
|
]
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "349516ab556de49b3272fd1d7a28607f10ecd215"
|
|
47
47
|
}
|
|
@@ -14,12 +14,12 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
const {
|
|
17
|
+
const { jwsVerify, decodeCredentialJwt } = require('@verii/jwt');
|
|
18
18
|
const { CheckResults } = require('./check-results');
|
|
19
19
|
|
|
20
|
-
const
|
|
20
|
+
const checkJwsVcTampering = async (jwt, verificationKey, { log }) => {
|
|
21
21
|
try {
|
|
22
|
-
await
|
|
22
|
+
await jwsVerify(jwt, verificationKey);
|
|
23
23
|
return CheckResults.PASS;
|
|
24
24
|
} catch (error) {
|
|
25
25
|
log.error(
|
|
@@ -32,4 +32,4 @@ const checkJwtVCTampering = async (jwt, verificationKey, { log }) => {
|
|
|
32
32
|
}
|
|
33
33
|
};
|
|
34
34
|
|
|
35
|
-
module.exports = {
|
|
35
|
+
module.exports = { checkJwsVcTampering };
|