@sphereon/ssi-sdk-ext.identifier-resolution 0.26.1-feature.SPRIND.116.8 → 0.26.1-feature.SPRIND.116.9
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.
|
@@ -1,4 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
26
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
27
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -11,7 +34,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
11
34
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
35
|
exports.resolveExternalOIDFEntityIdIdentifier = resolveExternalOIDFEntityIdIdentifier;
|
|
13
36
|
const ssi_sdk_agent_config_1 = require("@sphereon/ssi-sdk.agent-config");
|
|
14
|
-
const
|
|
37
|
+
const u8a = __importStar(require("uint8arrays"));
|
|
15
38
|
/**
|
|
16
39
|
* Resolves an OIDF Entity ID against multiple trust anchors to establish trusted relationships
|
|
17
40
|
*
|
|
@@ -64,7 +87,7 @@ function resolveExternalOIDFEntityIdIdentifier(opts, context) {
|
|
|
64
87
|
errorList[trustAnchor] = 'No signature was present in the trust anchor JWS';
|
|
65
88
|
continue;
|
|
66
89
|
}
|
|
67
|
-
payload = JSON.parse((
|
|
90
|
+
payload = JSON.parse(u8a.toString(u8a.fromString(jwtVerifyResult.jws.payload, 'base64url')));
|
|
68
91
|
const signature = jwtVerifyResult.jws.signatures[0];
|
|
69
92
|
if (signature.identifier.jwks.length === 0) {
|
|
70
93
|
errorList[trustAnchor] = 'No JWK was present in the trust anchor signature';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"externalOIDFIdentifier.js","sourceRoot":"","sources":["../../src/functions/externalOIDFIdentifier.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"externalOIDFIdentifier.js","sourceRoot":"","sources":["../../src/functions/externalOIDFIdentifier.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,sFAqEC;AAvFD,yEAA+D;AAE/D,iDAAkC;AAElC;;;;;;;;;;;;;GAaG;AACH,SAAsB,qCAAqC,CACzD,IAAwC,EACxC,OAAmC;;;QAEnC,IAAI,EAAE,YAAY,EAAE,UAAU,EAAE,GAAG,IAAI,CAAA;QAEvC,IAAI,CAAC,YAAY,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC/C,OAAO,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,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-resolution",
|
|
3
|
-
"version": "0.26.1-feature.SPRIND.116.
|
|
3
|
+
"version": "0.26.1-feature.SPRIND.116.9+9afc487",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
"generate-plugin-schema": "sphereon dev generate-plugin-schema"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@sphereon/ssi-sdk-ext.did-utils": "0.26.1-feature.SPRIND.116.
|
|
19
|
-
"@sphereon/ssi-sdk-ext.key-utils": "0.26.1-feature.SPRIND.116.
|
|
20
|
-
"@sphereon/ssi-sdk-ext.x509-utils": "0.26.1-feature.SPRIND.116.
|
|
18
|
+
"@sphereon/ssi-sdk-ext.did-utils": "0.26.1-feature.SPRIND.116.9+9afc487",
|
|
19
|
+
"@sphereon/ssi-sdk-ext.key-utils": "0.26.1-feature.SPRIND.116.9+9afc487",
|
|
20
|
+
"@sphereon/ssi-sdk-ext.x509-utils": "0.26.1-feature.SPRIND.116.9+9afc487",
|
|
21
21
|
"@sphereon/ssi-sdk.agent-config": "0.30.2-feature.SDK.41.oidf.support.286",
|
|
22
22
|
"@sphereon/ssi-sdk.oidf-client": " 0.30.2-feature.SDK.41.oidf.support.286",
|
|
23
23
|
"@sphereon/ssi-types": "0.30.2-feature.SDK.41.oidf.support.286",
|
|
@@ -28,10 +28,10 @@
|
|
|
28
28
|
"uint8arrays": "^3.1.1"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@sphereon/ssi-sdk-ext.did-provider-jwk": "0.26.1-feature.SPRIND.116.
|
|
32
|
-
"@sphereon/ssi-sdk-ext.did-resolver-jwk": "0.26.1-feature.SPRIND.116.
|
|
33
|
-
"@sphereon/ssi-sdk-ext.key-manager": "0.26.1-feature.SPRIND.116.
|
|
34
|
-
"@sphereon/ssi-sdk-ext.kms-local": "0.26.1-feature.SPRIND.116.
|
|
31
|
+
"@sphereon/ssi-sdk-ext.did-provider-jwk": "0.26.1-feature.SPRIND.116.9+9afc487",
|
|
32
|
+
"@sphereon/ssi-sdk-ext.did-resolver-jwk": "0.26.1-feature.SPRIND.116.9+9afc487",
|
|
33
|
+
"@sphereon/ssi-sdk-ext.key-manager": "0.26.1-feature.SPRIND.116.9+9afc487",
|
|
34
|
+
"@sphereon/ssi-sdk-ext.kms-local": "0.26.1-feature.SPRIND.116.9+9afc487",
|
|
35
35
|
"@sphereon/ssi-sdk.dev": "0.30.2-feature.SDK.41.oidf.support.286",
|
|
36
36
|
"@veramo/data-store": "4.2.0",
|
|
37
37
|
"@veramo/did-manager": "4.2.0",
|
|
@@ -65,5 +65,5 @@
|
|
|
65
65
|
"X.509 Certificates",
|
|
66
66
|
"ARF"
|
|
67
67
|
],
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "9afc4871e65ef851cd4c479ace388c0651243dca"
|
|
69
69
|
}
|
|
@@ -9,7 +9,7 @@ import {IAgentContext} from '@veramo/core'
|
|
|
9
9
|
import {IOIDFClient} from '@sphereon/ssi-sdk.oidf-client'
|
|
10
10
|
import {contextHasPlugin} from '@sphereon/ssi-sdk.agent-config'
|
|
11
11
|
import {IJwsValidationResult, JwsPayload} from '../types/IJwtService'
|
|
12
|
-
import
|
|
12
|
+
import * as u8a from 'uint8arrays'
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* Resolves an OIDF Entity ID against multiple trust anchors to establish trusted relationships
|
|
@@ -72,7 +72,7 @@ export async function resolveExternalOIDFEntityIdIdentifier(
|
|
|
72
72
|
continue
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
payload = JSON.parse(
|
|
75
|
+
payload = JSON.parse(u8a.toString(u8a.fromString(jwtVerifyResult.jws.payload, 'base64url')))
|
|
76
76
|
const signature = jwtVerifyResult.jws.signatures[0]
|
|
77
77
|
if (signature.identifier.jwks.length === 0) {
|
|
78
78
|
errorList[trustAnchor] = 'No JWK was present in the trust anchor signature'
|