jwt_generator 0.0.8 copy "jwt_generator: ^0.0.8" to clipboard
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
    • HmacSignifier for signing JWTs with HMAC-SHA256.
    • HmacSignatureVerifier for 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 + signingInput bytes.
  • RS256 convenience
    • verifyJwtRs256(String jwt, RSAPublicKey publicKey) top-level helper that verifies an RS256 JWT with a PointyCastle public key (handles nullable modulus/exponent safely).

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).

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.dart and 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.
  • 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.dart and parsed_jwt.dart for 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.
1
likes
140
points
1.26k
downloads

Publisher

unverified uploader

Weekly Downloads

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.

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

asn1lib, collection, convert, crypto, ds_standard_features, pointycastle, rsa_pkcs

More

Packages that depend on jwt_generator