pub struct PortableClaimsContext<'a> {Show 14 fields
pub audience: &'a AudienceId,
pub issuer: Principal,
pub mechanism: PortableMechanism,
pub key_binding_id: [u8; 32],
pub grants: &'a [DelegatedRoleGrant],
pub caller: Principal,
pub now_ns: u64,
pub authority_not_before_ns: u64,
pub authority_expires_at_ns: u64,
pub enrollment_expires_at_ns: u64,
pub min_login_started_at_ns: u64,
pub min_proof_issued_at_ns: u64,
pub max_login_ttl_ns: u64,
pub max_proof_ttl_ns: u64,
}Expand description
Protected runtime and active enrollment inputs, never inferred from claims. The host must select current, unrevoked authority under its transaction lock. Generation, login revocation, replay and atomic session writes remain host/ session-engine obligations; this context cannot attest its own provenance.
Fields§
§audience: &'a AudienceId§issuer: Principal§mechanism: PortableMechanism§key_binding_id: [u8; 32]§grants: &'a [DelegatedRoleGrant]§caller: PrincipalActual authenticated ingress sender, not an account subject or request field.
now_ns: u64§enrollment_expires_at_ns: u64§min_login_started_at_ns: u64Immutable login start floor, including the host’s qualified reset margin.
min_proof_issued_at_ns: u64§max_login_ttl_ns: u64Positive host limits, capped at 86,400 and 60 seconds respectively.
max_proof_ttl_ns: u64Implementations§
Source§impl PortableClaimsContext<'_>
impl PortableClaimsContext<'_>
Sourcepub fn advance_reset_floors(
&mut self,
clock_skew_ns: u64,
) -> Result<(), PortableClaimsError>
pub fn advance_reset_floors( &mut self, clock_skew_ns: u64, ) -> Result<(), PortableClaimsError>
Advance both admission cutoffs after losing session/replay/revocation state. Uses this context’s trusted boot time and deployment-qualified skew bound; the host must reject unavailable/rolled-back clocks before calling this. Floors never decrease, and overflow leaves both unchanged. This only calculates policy: the host must retain these values atomically with state invalidation, authenticate fresh enrollment and fail closed until ready. Do not call per request or discard the resulting floors after startup.