pub struct FederationServer { /* private fields */ }Expand description
Server-side authority that publishes one federation’s signed settings.
The server owns policy publication only. Applications still decide how a client authenticates this authority key and how the signed bytes are carried to clients. The server is not a signaling relay and does not participate in a peer’s WebRTC or CFR state machine.
Implementations§
Source§impl FederationServer
impl FederationServer
Sourcepub fn new(
federation: FederationId,
signer: SigningIdentity,
) -> Result<Self, Error>
pub fn new( federation: FederationId, signer: SigningIdentity, ) -> Result<Self, Error>
Creates an empty epoch-zero configuration with the supplied authority identity.
Returns the pinned authority identity clients must authenticate out of band.
Sourcepub fn federation(&self) -> FederationId
pub fn federation(&self) -> FederationId
Returns the currently configured federation namespace.
Sourcepub fn replace_members(
&mut self,
epoch: u64,
members: Vec<FederationMember>,
) -> Result<(), Error>
pub fn replace_members( &mut self, epoch: u64, members: Vec<FederationMember>, ) -> Result<(), Error>
Replaces all explicit member bindings at a strictly newer epoch.
An application must apply its admission and identity policy before calling this method. In particular, an FCP endpoint identity and CFR identity key are not considered equivalent simply because this server publishes them in one record.
Sourcepub fn publish(&self) -> Result<SignedFederationConfiguration, Error>
pub fn publish(&self) -> Result<SignedFederationConfiguration, Error>
Produces the canonical signed configuration artifact for application-selected delivery.