Skip to main content

periculum_identity_sdk 0.1.0 copy "periculum_identity_sdk: ^0.1.0" to clipboard
periculum_identity_sdk: ^0.1.0 copied to clipboard

Periculum Insights identity comparison SDK — guided face liveness capture and Dikript-backed ID verification.

periculum_identity_sdk #

Flutter SDK for Periculum Insights identity comparison: guided face liveness (ML Kit) + server-side Dikript identity match (BVN, NIN, PHONENUMBER, FRSC).

Install #

dependencies:
  periculum_identity_sdk:
    path: ../periculum_identity_sdk   # or pub.dev once published

Platform setup #

Authentication #

Use the same OAuth Bearer token you already use for Insights API calls (Keycloak client credentials / user token). The SDK does not embed API keys; your backend tenant wallet is debited on successful 200 responses, same as BVN verify.

Usage #

A — Business fixes ID type and number (customer only does face scan) #

final result = await client.verifyWithConfig(
  context: context,
  config: IdentityVerificationConfig(
    fixedIdType: DikriptIdentityType.bvn,
    fixedIdNumber: '22222222222',
  ),
);

B — Business fixes BVN only; customer enters their BVN #

final result = await client.verifyWithConfig(
  context: context,
  config: IdentityVerificationConfig(
    fixedIdType: DikriptIdentityType.bvn,
    allowedIdTypes: [DikriptIdentityType.bvn],
  ),
);

C — Customer chooses from Dikript types your product allows #

final result = await client.verifyWithConfig(
  context: context,
  config: IdentityVerificationConfig(
    allowCustomerToChooseIdType: true,
    allowedIdTypes: [
      DikriptIdentityType.bvn,
      DikriptIdentityType.nin,
    ], // or omit and call fetchIdTypeOptions() for tenant defaults
  ),
);

Liveness #

The SDK runs active liveness (ML Kit): single-face checks, distance hints, center → blink → head turn, accurate post-capture face validation — not a gallery pick.

final client = PericulumIdentityClient(
  baseUrl: 'https://insights-api.aws.insights-periculum.com',
  accessTokenProvider: () async => myInsightsBearerToken,
  livenessConfig: const FaceLivenessConfig(stepTimeout: Duration(seconds: 60)),
);

API #

Method Insights endpoint
verifyIdentity PUT /verify/identity-comparison (multipart/form-data: file, idType, idNumber, optional statementKey)

Webhooks #

When webhooks are enabled on your tenant, a successful match triggers an encrypted webhook with responseType: IDENTITY_COMPARISON and identityComparisonResponse payload (match score + Dikript identity payload).

Publish to pub.dev #

cd frontend/periculum_identity_sdk
dart pub publish --dry-run
dart pub publish

Ops #

  1. Run DB migration @113_PSSP-identity-comparison-dikript.psql on tenant Postgres.
  2. Add to GCP Secret Manager (Insights API secret JSON): DikriptSecretKey, optional DikriptBaseUrl, DikriptMinimumConfidence.
  3. Configure wallet pricing for endpoint IDENTITY_COMPARISON_VERIFICATION.
0
likes
0
points
792
downloads

Publisher

unverified uploader

Weekly Downloads

Periculum Insights identity comparison SDK — guided face liveness capture and Dikript-backed ID verification.

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

camera, flutter, google_mlkit_face_detection, http, http_parser, mime

More

Packages that depend on periculum_identity_sdk