@bedrock/vc-delivery 4.4.0 → 4.6.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/lib/openId.js +4 -2
- package/lib/verify.js +3 -5
- package/package.json +2 -2
package/lib/openId.js
CHANGED
|
@@ -107,7 +107,8 @@ export async function createRoutes({
|
|
|
107
107
|
jwks_uri: `${exchangeId}/openid/jwks`,
|
|
108
108
|
token_endpoint: `${exchangeId}/openid/token`,
|
|
109
109
|
credential_endpoint: `${exchangeId}/openid/credential`,
|
|
110
|
-
batch_credential_endpoint: `${exchangeId}/openid/batch_credential
|
|
110
|
+
batch_credential_endpoint: `${exchangeId}/openid/batch_credential`,
|
|
111
|
+
'pre-authorized_grant_anonymous_access_supported': true
|
|
111
112
|
};
|
|
112
113
|
res.json(oauth2Config);
|
|
113
114
|
}));
|
|
@@ -128,7 +129,8 @@ export async function createRoutes({
|
|
|
128
129
|
jwks_uri: `${exchangeId}/openid/jwks`,
|
|
129
130
|
token_endpoint: `${exchangeId}/openid/token`,
|
|
130
131
|
credential_endpoint: `${exchangeId}/openid/credential`,
|
|
131
|
-
batch_credential_endpoint: `${exchangeId}/openid/batch_credential
|
|
132
|
+
batch_credential_endpoint: `${exchangeId}/openid/batch_credential`,
|
|
133
|
+
'pre-authorized_grant_anonymous_access_supported': true
|
|
132
134
|
};
|
|
133
135
|
res.json(oauth2Config);
|
|
134
136
|
}));
|
package/lib/verify.js
CHANGED
|
@@ -2,11 +2,9 @@
|
|
|
2
2
|
* Copyright (c) 2022-2024 Digital Bazaar, Inc. All rights reserved.
|
|
3
3
|
*/
|
|
4
4
|
import * as bedrock from '@bedrock/core';
|
|
5
|
+
import * as Ed25519Multikey from '@digitalbazaar/ed25519-multikey';
|
|
5
6
|
import {importJWK, jwtVerify} from 'jose';
|
|
6
7
|
import {didIo} from '@bedrock/did-io';
|
|
7
|
-
import {
|
|
8
|
-
Ed25519VerificationKey2020
|
|
9
|
-
} from '@digitalbazaar/ed25519-verification-key-2020';
|
|
10
8
|
import {getZcapClient} from './helpers.js';
|
|
11
9
|
|
|
12
10
|
const {util: {BedrockError}} = bedrock;
|
|
@@ -150,8 +148,8 @@ export async function verifyDidProofJwt({workflow, exchange, jwt} = {}) {
|
|
|
150
148
|
{name: 'NotAllowedError'});
|
|
151
149
|
}
|
|
152
150
|
// FIXME: support other key types
|
|
153
|
-
const
|
|
154
|
-
const jwk =
|
|
151
|
+
const keyPair = await Ed25519Multikey.from(vm);
|
|
152
|
+
const jwk = await Ed25519Multikey.toJwk({keyPair});
|
|
155
153
|
jwk.alg = 'EdDSA';
|
|
156
154
|
return importJWK(jwk);
|
|
157
155
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bedrock/vc-delivery",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.6.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Bedrock Verifiable Credential Delivery",
|
|
6
6
|
"main": "./lib/index.js",
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
},
|
|
36
36
|
"homepage": "https://github.com/digitalbazaar/bedrock-vc-delivery",
|
|
37
37
|
"dependencies": {
|
|
38
|
+
"@digitalbazaar/ed25519-multikey": "^1.1.0",
|
|
38
39
|
"@digitalbazaar/ed25519-signature-2020": "^5.2.0",
|
|
39
|
-
"@digitalbazaar/ed25519-verification-key-2020": "^4.1.0",
|
|
40
40
|
"@digitalbazaar/ezcap": "^4.0.0",
|
|
41
41
|
"@digitalbazaar/oid4-client": "^3.1.0",
|
|
42
42
|
"@digitalbazaar/vc": "^6.0.1",
|