pub struct FormationVerifier { /* private fields */ }Expand description
What one member’s door holds to check a formation token: its formation, its own name, and the formation’s public key.
Implementations§
Source§impl FormationVerifier
impl FormationVerifier
pub fn new( formation_id: FormationId, member: String, key: FormationVerifyKey, ) -> Self
Sourcepub fn verify(&self, token: &str) -> Result<FormationCaller, FormationRefusal>
pub fn verify(&self, token: &str) -> Result<FormationCaller, FormationRefusal>
Check token in the fixed order tag → signature → payload → formation id, then its
audience.
Trait Implementations§
Source§impl Clone for FormationVerifier
impl Clone for FormationVerifier
Auto Trait Implementations§
impl Forget for FormationVerifier
impl Freeze for FormationVerifier
impl Move for FormationVerifier
impl RefUnwindSafe for FormationVerifier
impl Send for FormationVerifier
impl Sync for FormationVerifier
impl Unpin for FormationVerifier
impl UnsafeUnpin for FormationVerifier
impl UnwindSafe for FormationVerifier
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more