jwt_generator 0.0.8
jwt_generator: ^0.0.8 copied to clipboard
A simple pure dart package used for creating and validating Json Web Tokens using the private and public key provided, refer to documentation for more information.
0.0.8 #
- Bump to Dart version 3.9.4
0.0.7 #
Added #
- HS256 support
HmacSignifierfor signing JWTs with HMAC-SHA256.HmacSignatureVerifierfor verifying HS256 JWTs with a shared secret.
- ParsedJwt helper (generalized)
ParsedJwt.parse(String)moved to a generic location and exported; parses header/payload JSON and exposes signature +signingInputbytes.
- RS256 convenience
verifyJwtRs256(String jwt, RSAPublicKey publicKey)top-level helper that verifies an RS256 JWT with a PointyCastle public key (handles nullablemodulus/exponentsafely).
Changed #
- RSA helpers hardened
- Normalized Base64URL handling (padding tolerant) in verification paths.
- Tidied error messages and kept them human-readable (
JwtException, etc.).
- Examples
- Example now shows an end-to-end RS256 flow (build + verify with public key) and an HS256 flow (shared secret).
- Project hygiene
- Addressed analyzer lints across the new/updated files (including null-safe handling of
RSAPublicKey.modulus/exponent). - Kept public API shape stable (no breaking changes).
- Addressed analyzer lints across the new/updated files (including null-safe handling of
Fixed #
- Signature verification now correctly accepts tokens created with or without
=padding (Base64URL normalization). - Minor doc/code inconsistencies in exports (e.g., exposing
parsed_jwt.dartand RS256 helpers).
Documentation #
- README overhauled
- Correct install commands (
dart pub add jwt_generator,flutter pub add jwt_generator). - Clear guidance on RSA key generation and safe storage.
- Complete RS256 and HS256 examples: generate → sign → verify.
- Correct install commands (
- Clarified error types and typical failure modes in the docs.
0.0.6 #
- Bump to Dart version 3.9.3
- Bump ds_standard_features package
0.0.5 #
- Bump to Dart version 3.9
- Fix test packages
0.0.4 #
Added #
- ✅ Introduced asn1lib (v1.6.5) as a dependency to support ASN.1 DER/PEM key parsing for RSA/EC verification.
- ➕ Enhanced RS256 verifier to load and validate public keys from both JWK JSON and PEM/DER formats.
Changed #
- ♻️ Refactored
jwt_rs256_verifier.dartandparsed_jwt.dartfor cleaner imports and null-safety alignment. - 🔧 Improved linting rules and applied fixes across the library.
Fixed #
- 🐛 Resolved missing import in test suite (
rs256_verifier_test.dart) to ensure all test cases compile and run.
Documentation #
- 📝 Added this CHANGELOG.md.
- 📖 Updated README.md with dependency instructions and usage examples for DER/PEM parsing.
0.0.3 #
- Initial version.