Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Expose
decode/4
to skip decoding steps
Currently, `decode/3` performs various checks on a JWT, and then base64 decodes and finally JSON decodes the token. However, in some cases, it's desirable to skip the decoding steps, and just return the token payload in binary form. This exposes `decode/4` where the 4th argument is a decoder fun that defaults to `decode_b64url_json/1` for `decode/3` to retain existing behavior, but also exposes `decode_passthrough/1` in case a client wants to avoid any decoding steps.
- Loading branch information