Meeco/sd-jwt

The value that should be returned by the signer

Closed this issue · 1 comments

Thank you for releasing the library. There is one issue that I am concerned about and I would like to raise it as an Issue.

When I debug this test and check the value of this variable, it appears that an invalid JWT is generated as follows.
Specifically, there is an extra header and payload at the top.
(Line breaks have been added for readability)

eyJ0eXAiOiJzZCtqd3QiLCJhbGciOiJFUzI1NiJ9.
eyJfc2QiOlsiN2pwXzZOTlVBNEhFMkNaUlIyZnRvaDRab1NwbllobS02a29QTS1vOFFfZyIsImtqQUk0c1dyaFdUd2RwU1pmTFpQYXBYRWVXckZLMmR1QVFIQm5fNzZaMmsiXSwiX3NkX2FsZyI6InNoYS0yNTYifQ.
eyJ0eXAiOiJzZCtqd3QiLCJhbGciOiJFUzI1NiJ9.
eyJfc2QiOlsiN2pwXzZOTlVBNEhFMkNaUlIyZnRvaDRab1NwbllobS02a29QTS1vOFFfZyIsImtqQUk0c1dyaFdUd2RwU1pmTFpQYXBYRWVXckZLMmR1QVFIQm5fNzZaMmsiXSwiX3NkX2FsZyI6InNoYS0yNTYifQ.
0OaIJyrtIgC7sW3PaSmiFJpS4EAxk3ip5epKNPp6ka2CBCyWmr4yJpBkEV5Z5Qg0Kp-Cs1CBRLmrqw5c5M2jdA

I think the reason is that the signer responds with the JWT itself, not the signature value.
Is it assumed that the signer returns only the signature value?
I've prepared a PR for your reference and would be happy to review it.

Thank you for having a look.
Yes, the assumption was to have the signer only return the signature.

Thank you very much for catching the bug and submitting the PR