pub struct SessionBundleBuilder<'a> { /* private fields */ }Expand description
Fluent builder for issuing a SessionTrustBundle as the
coordinator.
Implementations§
Source§impl<'a> SessionBundleBuilder<'a>
impl<'a> SessionBundleBuilder<'a>
Sourcepub fn new(coordinator_key: &'a AitpSigningKey) -> Self
pub fn new(coordinator_key: &'a AitpSigningKey) -> Self
Begin a new bundle, signed by coordinator_key.
Sourcepub fn session_id(self, id: Uuid) -> Self
pub fn session_id(self, id: Uuid) -> Self
Set the session ID (UUIDv4). If unset, a fresh one is generated
at build() time.
Sourcepub fn participant(self, aid: Aid, tct: String) -> Self
pub fn participant(self, aid: Aid, tct: String) -> Self
Add a participant. The TCT (compact JWS, carried verbatim) MUST
be coordinator-issued (iss == coordinator_key.aid()) with
aud == aid. These invariants are checked in build().
Sourcepub fn build(self) -> Result<SessionTrustBundle, SessionBundleError>
pub fn build(self) -> Result<SessionTrustBundle, SessionBundleError>
Construct, sign, and return the bundle.
Auto Trait Implementations§
impl<'a> Freeze for SessionBundleBuilder<'a>
impl<'a> RefUnwindSafe for SessionBundleBuilder<'a>
impl<'a> Send for SessionBundleBuilder<'a>
impl<'a> Sync for SessionBundleBuilder<'a>
impl<'a> Unpin for SessionBundleBuilder<'a>
impl<'a> UnsafeUnpin for SessionBundleBuilder<'a>
impl<'a> UnwindSafe for SessionBundleBuilder<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more