Skip to main content

Crate idprova_verify

Crate idprova_verify 

Source
Expand description

§idprova-verify

High-level verification utilities for the IDProva protocol.

Provides three focused functions:

§Example

use idprova_verify::{verify_dat, verify_dat_from_jws};
use idprova_core::dat::constraints::EvaluationContext;

let compact_jws = "header.payload.signature"; // compact JWS from token issuer
let pub_key = [0u8; 32]; // issuer's Ed25519 public key bytes

// Full verification (signature + timing + scope + constraints)
let result = verify_dat(compact_jws, &pub_key, "mcp:tool:filesystem:read", &EvaluationContext::default());

// Signature + timing only (no scope/constraint check)
let dat = verify_dat_from_jws(compact_jws, &pub_key);

Functions§

verify_dat
Verify a compact JWS DAT token through the full pipeline.
verify_dat_from_jws
Verify a compact JWS DAT token — signature and timing only.
verify_receipt_log
Verify the hash-chain integrity of a receipt log.