decentralized-identity / decentralized-identity/web5-js

Add `typ` override to `Jwt.sign()`

Open
#488 2 comments 0 reactions 1 assignee Claimed by @nitro-neal View on GitHub
Dominant language
TypeScript
Stars
142
Forks
56
PR merge metrics
No merged PRs in 30d

Description

In our KCC issuance work we have a couple of JWT's which need to have a JWS header `typ` of something other-than the default value of `"JWT"`. Specifically, an `access_token` JWT ([here](https://github.com/TBD54566975/known-customer-credential?tab=readme-ov-file#access_token-jose-header)) needs the value `application/at+jwt` and also a `proof.jwt` ([here](https://github.com/TBD54566975/known-customer-credential?tab=readme-ov-file#proofjwt-jose-headers)) needs the value `openid4vci-proof+jwt`.

We need a way, while generating a JWT (via the call `Jwt.sign()` right?) to override this value. For example, [in web5-go we offer a `Type()` variadic parameter](https://github.com/TBD54566975/web5-go/blob/0cf8b3712803316fc869edfc79b7d08888f73e51/jwt/jwt.go#L72).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.