jose-jwt icon indicating copy to clipboard operation
jose-jwt copied to clipboard

Add `eitherDecodeClaims`

Open Lucsanszky opened this issue 3 years ago • 3 comments

As discussed here: https://github.com/tekul/jose-jwt/issues/35 , this PR adds a utility function which preserves the error messages when decoding claims. @tekul, I was bold enough to add a String parameter to the BadClaims error. Let me know if this is acceptable or you would rather see me introduce a new error constructor.

Lucsanszky avatar Jan 28 '22 00:01 Lucsanszky

Thanks for your review! I added the changes that you have requested, let me know if this looks any good to you.

Lucsanszky avatar Feb 17 '22 14:02 Lucsanszky