jose-jwt
jose-jwt copied to clipboard
Add `eitherDecodeClaims`
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.
Thanks for your review! I added the changes that you have requested, let me know if this looks any good to you.