pub struct PasswordAuth { /* private fields */ }Expand description
Implementations§
Source§impl PasswordAuth
impl PasswordAuth
Sourcepub fn add_user(
self,
username: impl Into<String>,
password: impl Into<String>,
) -> Self
pub fn add_user( self, username: impl Into<String>, password: impl Into<String>, ) -> Self
Adds a user with the given password.
Sourcepub fn user_count(&self) -> usize
pub fn user_count(&self) -> usize
Returns the number of registered users.
Trait Implementations§
Source§impl AuthHandler for PasswordAuth
impl AuthHandler for PasswordAuth
Source§fn auth_password<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 AuthContext,
password: &'life2 str,
) -> Pin<Box<dyn Future<Output = AuthResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn auth_password<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 AuthContext,
password: &'life2 str,
) -> Pin<Box<dyn Future<Output = AuthResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Authenticate with password. Read more
Source§fn supported_methods(&self) -> Vec<AuthMethod>
fn supported_methods(&self) -> Vec<AuthMethod>
Returns the authentication methods supported by this handler.
Source§fn auth_publickey<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 AuthContext,
key: &'life2 PublicKey,
) -> Pin<Box<dyn Future<Output = AuthResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn auth_publickey<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 AuthContext,
key: &'life2 PublicKey,
) -> Pin<Box<dyn Future<Output = AuthResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Authenticate with public key. Read more
Source§fn auth_keyboard_interactive<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 AuthContext,
response: &'life2 str,
) -> Pin<Box<dyn Future<Output = AuthResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn auth_keyboard_interactive<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 AuthContext,
response: &'life2 str,
) -> Pin<Box<dyn Future<Output = AuthResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Authenticate with keyboard-interactive. Read more
Source§fn auth_none<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 AuthContext,
) -> Pin<Box<dyn Future<Output = AuthResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn auth_none<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 AuthContext,
) -> Pin<Box<dyn Future<Output = AuthResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Check if “none” authentication is allowed. Read more
Auto Trait Implementations§
impl Freeze for PasswordAuth
impl RefUnwindSafe for PasswordAuth
impl Send for PasswordAuth
impl Sync for PasswordAuth
impl Unpin for PasswordAuth
impl UnwindSafe for PasswordAuth
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