selective_disclosure_jwt
1.1.1, released a year ago by affinidi.com
Dart SDK for working with Selective Disclosure JSON Web Tokens (SD-JWT)
What it does
Implements the IETF SD-JWT specification allowing issuers to create JWTs with selectively disclosable claims, holders to present specific claims, and verifiers to validate them.
AI-written summary of version 1.1.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to implement privacy-preserving data sharing using Selective Disclosure JSON Web Tokens.
- Your application acts as an Issuer, Holder, or Verifier within an SD-JWT workflow.
Skip it when
- You only require standard JWT encoding and decoding without selective disclosure features.
Strengths
- Supports multiple signing algorithms including ES256, ES256K, RS256, HS256, and EdDSA.
- Provides built-in key binding to prevent unauthorized presentations.
Weaknesses
- Niche standard that may require understanding complex IETF specifications.
- Custom signers, hashers, and verifiers must be written manually if you use uncommon cryptographic algorithms.
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 7
import 'package:selective_disclosure_jwt/selective_disclosure_jwt.dart';
void main() async {
final issuerPrivateKey = SdPrivateKey('KEY', SdJwtSignAlgorithm.es256k);
final handler = SdJwtHandlerV1();
final claims = {'given_name': 'Alice', 'family_name': 'Smith'};
final disclosureFrame = {'_sd': ['given_name']};
final sdJwt = await handler.sign(
claims: claims,
disclosureFrame: disclosureFrame,
signer: SDKeySigner(issuerPrivateKey),
);
print(sdJwt.serialized);
}Alternatives
Packages that do the same job and could replace selective_disclosure_jwt.
- corsac_jwt
Lightweight implementation of JSON Web Tokens (JWT) for Dart and Flutter.
58Compare - flutter_line_sdk
Flutter plugin to access native LINE SDKs for LINE Login integration.
86Compare - google_sign_in_ios
iOS and macOS implementation of Google Sign-In for Flutter
90Compare - auth0_flutter
Auth0 SDK for Flutter to integrate Auth0 authentication into mobile, desktop, and web apps.
90Compare
Works with
Packages commonly used together with selective_disclosure_jwt: ones it builds on, ones built on it, and its own family.
- cryptoselective_disclosure_jwt depends on itProvides SHA, MD5, and HMAC hashing functions for Dart.
- uuidselective_disclosure_jwt depends on itGenerates and parses RFC‑4122/9562 UUIDs (v1‑v8) for Dart.
- convertselective_disclosure_jwt depends on itEncoders and decoders for converting between different data representations.
- equatableselective_disclosure_jwt depends on itProvides value‑based equality for Dart objects without manual == and hashCode.
- dart_jsonwebtokenselective_disclosure_jwt depends on itA Dart library for creating, signing, decoding and verifying JSON Web Tokens (JWT).
- rfc_6901selective_disclosure_jwt depends on itImplements RFC 6901 JSON Pointer for reading, writing and removing values in JSON documents.
- ssiBuilt on selective_disclosure_jwtAffinidi Self-Sovereign Identity library for Dart and Flutter.