pub struct Verifier { /* private fields */ }
Expand description
Supports authenticating using a variety of methods
Implementations§
Source§impl Verifier
impl Verifier
pub fn new<I>(methods: I) -> Self
Sourcepub fn none() -> Self
pub fn none() -> Self
Creates a verifier that uses the NoneAuthenticationMethod
exclusively.
Sourcepub fn static_key<K>(key: K) -> Self
pub fn static_key<K>(key: K) -> Self
Creates a verifier that uses the StaticKeyAuthenticationMethod
exclusively.
Sourcepub fn methods(&self) -> impl Iterator<Item = &'static str> + '_
pub fn methods(&self) -> impl Iterator<Item = &'static str> + '_
Returns an iterator over the ids of the methods supported by the verifier
Sourcepub async fn verify(
&self,
authenticator: &mut dyn Authenticator,
) -> Result<&'static str>
pub async fn verify( &self, authenticator: &mut dyn Authenticator, ) -> Result<&'static str>
Attempts to verify by submitting challenges using the authenticator
provided. Returns the
id of the authentication method that succeeded. Fails if no authentication method succeeds.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Verifier
impl !RefUnwindSafe for Verifier
impl Send for Verifier
impl Sync for Verifier
impl Unpin for Verifier
impl !UnwindSafe for Verifier
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