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