pub struct VerifyConfig {
pub expected_audience: String,
pub expected_nonce: String,
pub max_iat_skew_secs: u64,
pub now_unix_secs: u64,
}Expand description
Configuration the RP supplies to verify_mid_response.
All fields are RP-supplied and reflect RP-local policy. The verifier never reaches out to MATA infrastructure to populate any of these.
Fields§
§expected_audience: StringThe RP’s bare origin (e.g. "https://acme.com"). Must equal the
JWT’s aud claim exactly. The wallet sets aud from the
rp_origin field in the original sign-in request; this check
catches a token issued to one RP being replayed at another.
expected_nonce: StringThe single-use nonce the RP issued for this sign-in session. Must
equal the JWT’s nonce claim exactly. The RP fetches this from
its own per-session store (e.g. the auth_nonces table).
max_iat_skew_secs: u64Maximum allowed forward clock skew between the wallet’s iat
and the verifier’s wall clock, in seconds. Tokens with iat > now + max_iat_skew_secs are rejected as “not yet valid”; this
guards against forward-dated tokens. 120s is a reasonable
default.
now_unix_secs: u64The verifier’s current wall-clock time in Unix seconds. Passed in by the caller (rather than read here) so the verifier stays a pure function — testable with fixed clocks, deterministic in production retries.