Skip to content

Commit

Permalink
Add typ in header for key binding type
Browse files Browse the repository at this point in the history
  • Loading branch information
bibash28 committed May 23, 2024
1 parent fff8b85 commit 93f4238
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions packages/oidc4vc/lib/src/oidc4vc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1480,12 +1480,11 @@ class OIDC4VC {
..setProtectedHeader('alg', tokenParameters.alg)

// add a key to sign, can only add one for JWT
..addRecipient(key, algorithm: tokenParameters.alg);
..addRecipient(key, algorithm: tokenParameters.alg)
..setProtectedHeader('typ', tokenParameters.mediaType.typ);

if (!ignoreProofHeaderType) {
/// Proof Header Type is ignored for clientSecretJwt
// also ignored for KB jwt
vpBuilder.setProtectedHeader('typ', tokenParameters.mediaType.typ);
/// Proof Header Type is ignored for KB jwt
switch (tokenParameters.proofHeaderType) {
case ProofHeaderType.kid:
Expand Down

0 comments on commit 93f4238

Please sign in to comment.