Skip to main content

tf_types/generated/
capability_token.rs

1// GENERATED by `tf-schema codegen --target rust` — DO NOT EDIT BY HAND.
2
3#![allow(unused_imports, non_camel_case_types, non_snake_case, clippy::all)]
4
5use serde::{Deserialize, Serialize};
6use super::*;
7
8/// Serialized capability grant carried across actors (TF-0004).
9#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
10pub struct CapabilityToken {
11    /// Version of the capability-token schema itself.
12    pub token_version: CapabilityToken_TokenVersion,
13    /// Stable token identifier, usable by revocations.
14    pub id: String,
15    /// Actor that issued the grant.
16    pub issuer: ActorId,
17    /// Actor the grant is issued to.
18    pub subject: ActorId,
19    /// Granted capability.
20    pub capability: Capability,
21    /// Additional constraints attached on top of those inside `capability`.
22    #[serde(skip_serializing_if = "Option::is_none", default)]
23    pub constraints: Option<Vec<Constraint>>,
24    /// Delegation chain leading to this grant, root at index 0.
25    #[serde(skip_serializing_if = "Option::is_none", default)]
26    pub chain: Option<Vec<DelegationLink>>,
27    /// When the token was issued.
28    pub issued_at: Timestamp,
29    /// When the token expires.
30    #[serde(skip_serializing_if = "Option::is_none", default)]
31    pub expires_at: Option<Timestamp>,
32    /// Optional hash reference to a proof event recording issuance.
33    #[serde(skip_serializing_if = "Option::is_none", default)]
34    pub proof_ref: Option<HashRef>,
35    /// Signature envelope over the canonical form of this token (not verified in the foundation phase).
36    pub signature: SignatureEnvelope,
37}
38
39/// Version of the capability-token schema itself.
40#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
41pub enum CapabilityToken_TokenVersion {
42    #[serde(rename = "1")]
43    V1,
44}