nearform / fast-jwt

Fast JSON Web Token implementation

Home Page:https://nearform.github.io/fast-jwt/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Provide fully decoded jwt object to key callback

hauptmedia opened this issue ยท comments

Hi,

it would really simplify my integration scenario if the complete decoded JWT object is passed to the key callback here:

https://github.com/nearform/fast-jwt/blob/master/src/verifier.js#L327

I want to dynamically resolve the key based on the issuer (iss) and need to have access to the payload.

Unfortunately this would be a breaking change because the header is now not the root level object anymore. Perhaps it could make sense to make this configurable?

What do you think?

Cheers,

Julian

@hauptmedia Can you try this PR and see if it works properly for your use case?

Works great, thank you

๐ŸŽ‰ This issue has been resolved in version 3.0.0 ๐ŸŽ‰

The release is available on:

Your optic bot ๐Ÿ“ฆ๐Ÿš€