DCIT / perl-Crypt-JWT

Other
54 stars 18 forks source link

Empty payload in JWS JSON token #19

Closed avkhozov closed 4 years ago

avkhozov commented 4 years ago

There is cases when payload is empty string in JWS JSON token (for example in ACME protocol: https://tools.ietf.org/html/rfc8555#section-7.4.2), but Crypt::JWT return unsupported JWS/JWT JSON Serialization for such tokes.

Can we weaken a test for payload field using define $hash->{payload} in https://github.com/DCIT/perl-Crypt-JWT/blob/master/lib/Crypt/JWT.pm#L707?

karel-m commented 4 years ago

You are right. Do you think that you will find some spare time to create a pull request with a failing test for this case?

avkhozov commented 4 years ago

@karel-m I have created PR with test and possible fix.

karel-m commented 4 years ago

Released as Crypt-JWT-0.025. Thank you for your time.