Skip to main content

structured_ltv/
credential.rs

1//! Format-owner authentication of an original protected credential.
2
3use crate::pki::Authorities;
4
5/// Completed format authentication, separate from application authorization.
6/// This is the same contract for XML, CMS and other `AdES` credential carriers;
7/// each carrier binds the result to its actual original payload and signer.
8pub enum Authentication<'path, 'document, E> {
9    /// The original credential format has no selected authentication handler.
10    Unsupported,
11    /// The selected handler completed and rejected the original credential.
12    Rejected,
13    /// Original signature/issuer authentication succeeded using these actual
14    /// authority paths/effective keys. Asserted-role authorization, historical
15    /// trust and revocation/freshness acceptance remain separate.
16    Authenticated {
17        /// Actual retained format receipt, not a trusted boolean.
18        evidence: E,
19        /// Complete authority inputs used by authentication. Empty Paths is
20        /// insufficient evidence, never an implicit certificate-free result.
21        authorities: Authorities<'path, 'document>,
22    },
23}