Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate from jsonwebtoken to jwt-rustcrypto and Miscellaneous Improvements #9

Merged
merged 2 commits into from
Oct 21, 2024

Conversation

robjsliwa
Copy link
Owner

  1. JWT Backend Migration:
    • Replaced the jsonwebtoken crate with jwt-rustcrypto to improve flexibility and support for RustCrypto-based algorithms.
    • Updated key handling structures (KeyForDecoding, KeyForEncoding) and adjusted the internal algorithm validation logic accordingly.
    • Updated features in Cargo.toml to reflect the new optional jwt-rustcrypto dependency and adjusted the noring and default feature sets.
  2. Refactoring and Simplifications:
    • Removed the ring-based conditional code to focus on a single JWT library (RustCrypto).
    • Simplified the KeyForDecoding and KeyForEncoding structs to handle RSA components and PEM formats consistently across features.
  3. Validation Improvements:
    • Enhanced the Validation struct to include new convenience methods such as without_expiry(), with_audience(), and with_issuer(), providing a more flexible API for users.
    • Replaced direct uses of no_exp with without_expiry() for clarity and consistency in handling token expiration.
  4. Miscellaneous Fixes:
    • Updated the README to reflect the new usage of jwt-rustcrypto and supported algorithms.
    • Addressed linter errors and minor code style issues.
    • Fixed inconsistencies in key generation and conversion methods, particularly in test utilities.
    • Renamed some modules (algorithm to algorithms) and performed other minor refactors to improve code clarity and organization.

@robjsliwa robjsliwa self-assigned this Oct 21, 2024
@robjsliwa robjsliwa merged commit 1a0612f into main Oct 21, 2024
2 checks passed
@robjsliwa robjsliwa deleted the torc branch October 21, 2024 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant