pub struct PublicKeyAuth { /* private fields */ }Expand description
Implementations§
Source§impl PublicKeyAuth
impl PublicKeyAuth
Sourcepub fn add_keys<I>(self, keys: I) -> Selfwhere
I: IntoIterator<Item = PublicKey>,
pub fn add_keys<I>(self, keys: I) -> Selfwhere
I: IntoIterator<Item = PublicKey>,
Adds multiple global keys.
Sourcepub fn add_user_key(self, username: impl Into<String>, key: PublicKey) -> Self
pub fn add_user_key(self, username: impl Into<String>, key: PublicKey) -> Self
Adds a key that can only authenticate a specific user.
Sourcepub fn global_key_count(&self) -> usize
pub fn global_key_count(&self) -> usize
Returns the number of global keys.
Sourcepub fn user_key_count(&self, username: &str) -> usize
pub fn user_key_count(&self, username: &str) -> usize
Returns the number of keys for a specific user.
Trait Implementations§
Source§impl AuthHandler for PublicKeyAuth
impl AuthHandler for PublicKeyAuth
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 supported_methods(&self) -> Vec<AuthMethod>
fn supported_methods(&self) -> Vec<AuthMethod>
Returns the authentication methods supported by this handler.
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 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
Source§impl Default for PublicKeyAuth
impl Default for PublicKeyAuth
Source§fn default() -> PublicKeyAuth
fn default() -> PublicKeyAuth
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PublicKeyAuth
impl RefUnwindSafe for PublicKeyAuth
impl Send for PublicKeyAuth
impl Sync for PublicKeyAuth
impl Unpin for PublicKeyAuth
impl UnwindSafe for PublicKeyAuth
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