levino/mock-jwks

Include typ: "JWT" ad header

AndresBarreto-code opened this issue · 2 comments

Hi all,

In a serverless function, we hace a validation header JWT token. Is it posible to include a header as { typ: "JWT" }?

https://github.com/Levino/mock-jwks/blob/c4ee29f39768980520851a2e28c34af82ca9b3a0/src/tools.ts#L165

Thank you for creating this issue. Could you please elaborate? You have an application which accepts not only "JWT" type jwts but also "media" type jwts (like jpegs?). Since the token is usually either sent as a cookie or as a bearer token, I would be surprised if you have to investigate the auth token further to distinguish it from your media jwts. So I currently would think that the solution in your app is a quick refactoring. I would be open to allow additional headers for the tokens if I see that there are cases in which no better solution can be found.

Closing due to no activity.