JWT (RFC 9068, EdDSA) issuance + verification engine for the Ppoppo ecosystem. Single deep module with a small interface (issue, verify) hiding RFC 8725 mitigations M01-M45, JWKS handling, and substrate ports (epoch, session, replay).
//! Server-pinned set of decoding keys indexed by `kid`.
//!//! `kid` resolution is M12: the engine MUST look the key up in this struct
//! and never follow `jku`/`x5u` URLs (those headers fail M07/M08 first).
usejsonwebtoken::DecodingKey;usestd::collections::HashMap;pubstructKeySet{keys:HashMap<String, DecodingKey>,
}implKeySet{#[must_use]pubfnnew()->Self{Self{
keys:HashMap::new(),}}pubfninsert(&mutself, kid: impl Into<String>, key: DecodingKey){self.keys.insert(kid.into(), key);}pub(crate)fnget(&self, kid:&str)->Option<&DecodingKey>{self.keys.get(kid)}}implDefault forKeySet{fndefault()->Self{Self::new()}}