identidad_sdk 0.1.1 copy "identidad_sdk: ^0.1.1" to clipboard
identidad_sdk: ^0.1.1 copied to clipboard

Flutter/Dart SDK for verifying Identidad access tokens and parsing assurance claims.

identidad_sdk #

Flutter/Dart helpers for verifying Identidad access tokens and parsing Identidad-specific assurance claims:

  • acr: AAL0..AAL3
  • ial: IAL0..IAL3

This package is a plain Dart package, so it works in Flutter apps and server-side Dart code.

Install #

dart pub add identidad_sdk

Verify an access token #

import 'package:identidad_sdk/identidad_sdk.dart';

final verifier = createIdentidadVerifier(
  const IdentidadVerifierOptions(
    issuer: 'https://issuer.example',
    audiences: ['demo-client'],
    clockSkew: Duration(seconds: 60),
  ),
);

final verified = await verifier.verifyAccessToken(accessToken);

print(verified.claims.sub);
print(verified.claims.acr.wireValue);
print(verified.claims.scopes);

Package contents #

  • createIdentidadVerifier: verifies RS256 access tokens against the issuer JWKS
  • parseAal / parseIal: strict assurance claim parsing
  • hasAalAtLeast / hasIalAtLeast: assurance policy helpers
  • parseScopes: scope parsing with trimming and de-duplication

Development #

dart pub get
dart test

Publish #

See RELEASING.md.

0
likes
0
points
0
downloads

Publisher

unverified uploader

Weekly Downloads

Flutter/Dart SDK for verifying Identidad access tokens and parsing assurance claims.

Homepage

Topics

#oidc #oauth #jwt #flutter

License

unknown (license)

Dependencies

http, jose

More

Packages that depend on identidad_sdk