pub struct StreamedVerifyOptions<'a> {
pub required_scope: String,
pub challenge_store: Option<Box<dyn ChallengeStore + 'a>>,
pub session_context: Vec<u8>,
pub stream: Option<StreamContext>,
pub now: Option<i64>,
}Expand description
The verifier-side controls that apply to a streamed-turn presentation
(SPEC §5.13). Deliberately NOT the full VerifyOptions: a streamed
turn re-verifies liveness and bindings, not the chain, so revocation,
policy, constraint, audit, and anchor options have no field here and
can never be passed and silently ignored. Callers who need fresh
revocation or policy semantics — including high-value operations the
spec directs to force_revocation_check — MUST run full
verify_bundle instead.
Fields§
§required_scope: StringMust be present in token.granted_scope for the turn to be valid;
empty skips the check. The token stores the verified chain’s
effective scope lex-sorted for exactly this check.
challenge_store: Option<Box<dyn ChallengeStore + 'a>>Makes the per-turn challenge single-use: consulted (without consuming) after the session token’s HMAC authenticates the presentation and before the per-turn hybrid challenge signature is verified; atomically consumed after that signature verifies — before the scope check. Store failures normalize to the canonical unknown_challenge result.
session_context: Vec<u8>Verifier-side session binding; when set, the turn’s presented session_context must match byte-for-byte.
stream: Option<StreamContext>Verifier-side stream state (stream_id match; stream_seq must be exactly last_seen_seq+1, else stream_seq_replay / stream_seq_skip).
This is a caller-owned SNAPSHOT: the verifier only reads it and
never advances it. Two concurrent turns carrying distinct valid
challenges and the same stream_seq will BOTH verify against the
same snapshot. Concurrency-safe sequence enforcement is the
caller’s responsibility: atomically compare-and-advance your
tracked last-seen sequence to turn.stream_seq when (and only
when) verification succeeds, and build the snapshot from that
tracked state.
now: Option<i64>Clock override (unix seconds); None uses the system clock (std
builds only — no_std callers MUST set it).