Skip to content
pubscout

jose

0.3.5+2, released 8 months ago by appsup.be

Javascript Object Signing and Encryption library supporting JWE, JWS, JWK and JWT.

WASM-ready
$ flutter pub add jose
Source repository

What it does

Provides support for Javascript Object Signing and Encryption (JOSE), allowing developers to handle JSON Web Signature (JWS), JSON Web Encryption (JWE), JSON Web Key (JWK), and JSON Web Token (JWT) in Dart and Flutter. It supports a wide range of signing, key wrapping, and encryption algorithms.

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

Use it when

  • You need to decode, verify, and validate JSON Web Tokens (JWT) in your application.
  • You need to sign and encrypt payloads using JSON Web Signature (JWS) and JSON Web Encryption (JWE).

Skip it when

  • You do not use JWT, JWS, JWE, or JWK standards in your application's architecture.

Strengths

  • Comprehensive algorithm support for both JWS and JWE.
  • Supports serialization, parsing, and cryptographic operations for JWTs and JWKs.

Weaknesses

  • Maintenance depends heavily on community and individual author sponsorship.
  • Not documented for platforms beyond the core Dart capabilities and standard Flutter targets.

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
9
main() async {
  var encoded = "eyJ0eXAiOiJKV1QiLA0KICJhbGciOiJIUzI1NiJ9." + 
      "eyJpc3MiOiJqb2UiLA0KICJleHAiOjEzMDA4MTkzODAsDQogImh0dHA6Ly9leGFt" +
      "cGxlLmNvbS9pc19yb290Ijp0cnVlfQ." +
      "dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk";
  var jwt = new JsonWebToken.unverified(encoded);
  print("claims: ${jwt.claims}");
}

Works with

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