#[non_exhaustive]pub struct StatusTokenPayload {
pub agent_id: Uuid,
pub status: BadgeStatus,
pub iat: i64,
pub exp: i64,
pub ans_name: AnsName,
pub valid_identity_certs: Vec<CertEntry>,
pub valid_server_certs: Vec<CertEntry>,
pub metadata_hashes: BTreeMap<String, String>,
}Expand description
Decoded payload of a SCITT status token (after COSE signature verification).
Status tokens are COSE_Sign1 structures with CBOR integer-keyed payloads.
The CBOR keys (1-8) map to the fields below. The token is time-bounded
by the iat (issued-at) and exp (expiry) Unix timestamps.
This struct is deserialized from CBOR by the scitt module in ans-verify.
It is placed here in ans-types because it has no crypto dependencies —
only standard serde types.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.agent_id: UuidAgent’s unique ID (CBOR key 1).
status: BadgeStatusCurrent agent status (CBOR key 2). Reuses the existing BadgeStatus enum.
iat: i64Issued-at timestamp as Unix seconds (CBOR key 3).
exp: i64Expiry timestamp as Unix seconds (CBOR key 4).
ans_name: AnsNameFull ANS name, e.g. "ans://v1.0.0.agent.example.com" (CBOR key 5).
Validated at deserialization time — always a well-formed ANS URI.
valid_identity_certs: Vec<CertEntry>Valid identity certificates for mTLS verification (CBOR key 6).
valid_server_certs: Vec<CertEntry>Valid server certificates for TLS verification (CBOR key 7).
metadata_hashes: BTreeMap<String, String>Optional metadata hashes (CBOR key 8).
BTreeMap for deterministic serialization ordering.
Implementations§
Trait Implementations§
Source§impl Clone for StatusTokenPayload
impl Clone for StatusTokenPayload
Source§fn clone(&self) -> StatusTokenPayload
fn clone(&self) -> StatusTokenPayload
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more