pub struct SessionParticipantStatement {
pub type_: String,
pub session_ref: String,
pub invitation_ref: String,
pub joining_agent: String,
pub joining_agent_cert_ref: Option<String>,
pub joined_at: String,
pub capabilities: GrantedCapabilities,
}Expand description
The unsigned payload. Wrap in a DSSE envelope; the envelope MUST carry two signatures (joining agent first, then host countersign).
Fields§
§type_: String§session_ref: StringSame session_ref as the invitation. The verifier checks
equality.
invitation_ref: StringArtifact id of the invitation this participant event redeems.
joining_agent: StringJoining agent’s Ed25519 public key (base64url-no-pad).
joining_agent_cert_ref: Option<String>Optional certificate artifact id; set when the invitation’s
restriction was Cert and the joining agent presented a cert.
joined_at: StringRFC 3339.
capabilities: GrantedCapabilitiesCOPIED from the invitation at join time. Immutable – any mutation invalidates the joining_agent and host signatures.
Implementations§
Source§impl SessionParticipantStatement
impl SessionParticipantStatement
pub fn new( session_ref: impl Into<String>, invitation_ref: impl Into<String>, joining_agent: impl Into<String>, joined_at: impl Into<String>, capabilities: GrantedCapabilities, ) -> Self
Sourcepub fn canonical_for_signing(&self) -> String
pub fn canonical_for_signing(&self) -> String
Canonical signing bytes. Same pipe-delimited v0.10.4 shape as
InvitationStatement::canonical_for_signing.
Format:
"v1|session-participant|{session_ref}|{invitation_ref}|{joining_agent}|{cert_ref_or_empty}|{joined_at}|{capabilities_canonical}"
Sourcepub fn sign_as_joining_agent(
&self,
signer: &dyn Signer,
) -> Result<String, SignerError>
pub fn sign_as_joining_agent( &self, signer: &dyn Signer, ) -> Result<String, SignerError>
Sign with the joining agent’s keypair. Returns the base64url signature suitable to drop into a DSSE envelope’s first signature slot.
Sourcepub fn sign_as_host(&self, signer: &dyn Signer) -> Result<String, SignerError>
pub fn sign_as_host(&self, signer: &dyn Signer) -> Result<String, SignerError>
Sign with the host’s keypair (the countersign). The verifier rejects participant envelopes whose host signature is missing or whose signing key does not match the invitation’s issuer.
Sourcepub fn pending_envelope(
&self,
joining_signer: &dyn Signer,
) -> Result<Envelope, SignerError>
pub fn pending_envelope( &self, joining_signer: &dyn Signer, ) -> Result<Envelope, SignerError>
Build a DSSE envelope around the statement carrying ONLY the
joining_agent signature. The verifier rejects this as
MissingHostCountersign; this constructor exists so the
treeship session join CLI can emit a “pending countersign”
blob the host then fills in via treeship session countersign.
Sourcepub fn attach_host_countersign(
envelope: &Envelope,
host_signer: &dyn Signer,
) -> Result<Envelope, SignerError>
pub fn attach_host_countersign( envelope: &Envelope, host_signer: &dyn Signer, ) -> Result<Envelope, SignerError>
Add the host’s countersign to a pending envelope. Returns the finalized envelope with both signatures. Order is preserved: signatures[0] = joining_agent, signatures[1] = host.
Trait Implementations§
Source§impl Clone for SessionParticipantStatement
impl Clone for SessionParticipantStatement
Source§fn clone(&self) -> SessionParticipantStatement
fn clone(&self) -> SessionParticipantStatement
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more