Skip to main content

SessionParticipantStatement

Struct SessionParticipantStatement 

Source
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: String

Same session_ref as the invitation. The verifier checks equality.

§invitation_ref: String

Artifact id of the invitation this participant event redeems.

§joining_agent: String

Joining 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: String

RFC 3339.

§capabilities: GrantedCapabilities

COPIED from the invitation at join time. Immutable – any mutation invalidates the joining_agent and host signatures.

Implementations§

Source§

impl SessionParticipantStatement

Source

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

Source

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}"

Source

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.

Source

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.

Source

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.

Source

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

Source§

fn clone(&self) -> SessionParticipantStatement

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SessionParticipantStatement

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for SessionParticipantStatement

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for SessionParticipantStatement

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V