Skip to content
pubscout

jaguar_jwt

3.0.0, released 6 years ago by an unverified publisher

Provides JWT utilities for Dart including issuing, verifying, and parsing tokens.

WASM-readyUnverified publisher
$ flutter pub add jaguar_jwt
Source repository

What it does

Generates and processes JSON Web Tokens (JWT) using the HMAC SHA-256 algorithm. It allows creating claim sets, issuing tokens, verifying signatures, and validating claims.

AI-written summary of version 3.0.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to issue JSON Web Tokens (JWT) using HMAC SHA-256 in a Dart or Flutter app.
  • You need to verify JWT signatures and validate claim sets such as expiration, issuer, and audience.

Skip it when

  • You require algorithms other than HMAC SHA-256 (e.g., RSA or elliptic curve algorithms) for signing.
  • You need complex token management features not covered by basic HS256 JWT issuing and verification.

Strengths

  • Simple API for issuing and verifying JWTs.
  • Supports registered and custom claims validation.
  • Null safe.

Weaknesses

  • Currently only supports the HMAC SHA-256 algorithm.
  • Limited active development status based on Travis CI badges and older ecosystem footprint.

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
2
final key = 's3cr3t';
final claimSet = JwtClaim(
    subject: 'kleak',
    issuer: 'teja',
    maxAge: const Duration(minutes: 5));
String token = issueJwtHS256(claimSet, key);

Alternatives

Packages that do the same job and could replace jaguar_jwt.

Works with

Packages commonly used together with jaguar_jwt: ones it builds on, ones built on it, and its own family.