pub struct PicPcaPayload {
pub profile: String,
pub lineage_id: Option<String>,
pub expires_at: Option<i64>,
pub position: u64,
pub context_of_authority: IndexedAuthorityMap,
pub challenge: PcaChallenge,
}Expand description
PIC PCA COSE payload: the signed trusted authority checkpoint.
Fields§
§profile: StringPIC profile identifier; must equal crate::PROFILE_0_2.
lineage_id: Option<String>Stable lineage identifier for this continuity chain.
The same value is mirrored into PIC Token JWT jti, giving logs and
offline inspectors one correlation handle that survives advancement.
expires_at: Option<i64>Absolute NumericDate after which this lineage should no longer be advanced or accepted as a live token.
When present, the same value is mirrored into PIC Token JWT exp. It is
fixed at initialization and preserved by advancement, so exchanging a
candidate cannot extend authority by minting a fresh token lifetime.
position: u64Position of this checkpoint in its lineage, starting at 0.
The canonical Indexed Authority Map in force at this checkpoint.
challenge: PcaChallengeChallenge state binding the next transition to this checkpoint.
Implementations§
Source§impl PicPcaPayload
impl PicPcaPayload
Sourcepub fn new(
position: u64,
context: IndexedAuthorityMap,
next_challenge: Vec<u8>,
) -> PicPcaPayload
pub fn new( position: u64, context: IndexedAuthorityMap, next_challenge: Vec<u8>, ) -> PicPcaPayload
A Profile 0.2 checkpoint payload at position carrying context
and the verifier-issued next_challenge.
Sourcepub fn with_lineage_id(self, lineage_id: impl Into<String>) -> PicPcaPayload
pub fn with_lineage_id(self, lineage_id: impl Into<String>) -> PicPcaPayload
Adds the stable lineage identifier mirrored into PIC Token JWT jti.
Sourcepub fn with_optional_lineage_id(
self,
lineage_id: Option<String>,
) -> PicPcaPayload
pub fn with_optional_lineage_id( self, lineage_id: Option<String>, ) -> PicPcaPayload
Carries a lineage identifier when the predecessor had one.
Sourcepub fn with_expires_at(self, expires_at: i64) -> PicPcaPayload
pub fn with_expires_at(self, expires_at: i64) -> PicPcaPayload
Adds the absolute lineage expiration mirrored into PIC Token JWT exp.
Sourcepub fn with_optional_expires_at(self, expires_at: Option<i64>) -> PicPcaPayload
pub fn with_optional_expires_at(self, expires_at: Option<i64>) -> PicPcaPayload
Carries an absolute lineage expiration when the predecessor had one.
Sourcepub fn check_profile(&self) -> Result<(), RejectReason>
pub fn check_profile(&self) -> Result<(), RejectReason>
Rejects the payload unless profile is crate::PROFILE_0_2.
Sourcepub fn validate(&self) -> Result<(), RejectReason>
pub fn validate(&self) -> Result<(), RejectReason>
Validates the checkpoint payload before it is signed or accepted.
Trait Implementations§
Source§impl Clone for PicPcaPayload
impl Clone for PicPcaPayload
Source§fn clone(&self) -> PicPcaPayload
fn clone(&self) -> PicPcaPayload
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more