Skip to content
This repository was archived by the owner on Jan 20, 2025. It is now read-only.

Commit 069a7d3

Browse files
mustafasalfitinitin-vavdiya
authored andcommitted
fix: add keyId to createPresentation
1 parent 760ee94 commit 069a7d3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/org/eclipse/tractusx/managedidentitywallets/service/PresentationService.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,13 +176,14 @@ private void buildVPJsonLd(String callerBpn, List<VerifiableCredential> verifiab
176176
@SneakyThrows({ InvalidPrivateKeyFormatException.class})
177177
private void buildVPJwtEdDSA(String audience, String callerBpn, Wallet callerWallet, List<VerifiableCredential> verifiableCredentials, SupportedAlgorithms algorithm, Map<String, Object> response) {
178178
Pair<Did, Object> result = getPrivateKey(callerWallet, algorithm, audience, callerBpn);
179+
String keyId = walletKeyService.getWalletKeyIdByWalletId(callerWallet.getId());
179180

180181
SerializedJwtPresentationFactory presentationFactory = new SerializedJwtPresentationFactoryImpl(
181182
new SignedJwtFactory(new OctetKeyPairFactory()), new JsonLdSerializerImpl(), result.getKey());
182183

183184
X25519PrivateKey ed25519Key = (X25519PrivateKey) result.getRight();
184185
X25519PrivateKey privateKey = new X25519PrivateKey(ed25519Key.asByte());
185-
SignedJWT presentation = presentationFactory.createPresentation(result.getLeft(), verifiableCredentials, audience, privateKey , "keyId" );
186+
SignedJWT presentation = presentationFactory.createPresentation(result.getLeft(), verifiableCredentials, audience, privateKey , keyId);
186187

187188
response.put(StringPool.VP, presentation.serialize());
188189
}

0 commit comments

Comments
 (0)