DevToys
DevToys copied to clipboard
JWT encoding/decoding improvements
Pull request type
Please check the type of change your PR introduces:
- [x] Bugfix
- [x] New feature or enhancement
- [ ] UI change (please include screenshot!)
- [ ] Code style update (formatting, renaming)
- [ ] Refactoring (no functional changes, no api changes)
- [ ] Build related changes
- [ ] Documentation content changes
- [ ] Internationalization and localization
- [ ] Other (please describe):
What is the current behavior?
Issue Number: N/A
What is the new behavior?
This PR includes a few improvements to JWT encoding/decoding.
- Allow encoding tokens with RSA private keys
- Make the header field readonly in encoding mode (since it doesn't currently affect the output, although that could be a future enhancement)
- Allow validating signature with a certificate containing a public key
- Fix an issue where the saved token algorithm was not loaded correctly
Other information
Quality check
Before creating this PR:
- [x] Did you follow the code style guideline as described in CONTRIBUTING.md
- [x] Did you build the app and test your changes?
- [ ] Did you check for accessibility? On Windows, you can use Accessibility Insights for this.
- [ ] Did you verify that the change work in Release build configuration
- [x] Did you verify that all unit tests pass
- [ ] If necessary and if possible, did you verify your changes on:
- [x] Windows
- [ ] macOS (DevToys 2.0)
- [ ] Linux (DevToys 2.0)
@btiteux , as you own this tool and know better about JWT than I do, could you please take a look at this PR? :)