From ab78971cae027e245e80984b09f0e8fe92730a47 Mon Sep 17 00:00:00 2001 From: Bibash Shrestha Date: Wed, 18 Dec 2024 17:25:36 +0545 Subject: [PATCH] feat: Remove alg and use from headers of jwt #3202 --- packages/oidc4vc/lib/src/oidc4vc.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/oidc4vc/lib/src/oidc4vc.dart b/packages/oidc4vc/lib/src/oidc4vc.dart index c18061dc5..ddf7cc03a 100644 --- a/packages/oidc4vc/lib/src/oidc4vc.dart +++ b/packages/oidc4vc/lib/src/oidc4vc.dart @@ -1649,7 +1649,9 @@ class OIDC4VC { case ProofHeaderType.jwk: vpBuilder.setProtectedHeader( 'jwk', - tokenParameters.publicJWK, + tokenParameters.publicJWK + ..removeWhere((key, value) => key == 'use') + ..removeWhere((key, value) => key == 'alg'), ); } }