pub(crate) struct PublicKeyAuth {
pub(crate) global_paths: &'static [&'static str],
pub(crate) user_dir: &'static str,
pub(crate) deny_root_login: bool,
pub(crate) global_keys: Vec<AuthorizedKey>,
pub(crate) global_fingerprint: u64,
}Fields§
§global_paths: &'static [&'static str]§user_dir: &'static str§deny_root_login: bool§global_keys: Vec<AuthorizedKey>§global_fingerprint: u64Implementations§
Source§impl PublicKeyAuth
impl PublicKeyAuth
Sourcepub(crate) fn from_paths(
global_paths: &'static [&'static str],
user_dir: &'static str,
deny_root_login: bool,
) -> Self
pub(crate) fn from_paths( global_paths: &'static [&'static str], user_dir: &'static str, deny_root_login: bool, ) -> Self
Builds a value from paths.
Sourcepub(crate) fn reload_global(&mut self) -> bool
pub(crate) fn reload_global(&mut self) -> bool
Implements reload global.
Sourcepub(crate) fn load_keys_from_paths(paths: &[&str]) -> Vec<AuthorizedKey>
pub(crate) fn load_keys_from_paths(paths: &[&str]) -> Vec<AuthorizedKey>
Implements load keys from paths.
Sourcepub(crate) fn load_user_keys(&self, username: &[u8]) -> Vec<AuthorizedKey>
pub(crate) fn load_user_keys(&self, username: &[u8]) -> Vec<AuthorizedKey>
Implements load user keys.
Sourcepub(crate) fn sanitize_username(username: &[u8]) -> Option<String>
pub(crate) fn sanitize_username(username: &[u8]) -> Option<String>
Implements sanitize username.
Parses authorized keys.
Sourcepub(crate) fn find_algo_index(tokens: &[&str]) -> Option<usize>
pub(crate) fn find_algo_index(tokens: &[&str]) -> Option<usize>
Implements find algo index.
Sourcepub(crate) fn looks_like_algo(token: &str) -> bool
pub(crate) fn looks_like_algo(token: &str) -> bool
Implements looks like algo.
Sourcepub(crate) fn matches(
keys: &[AuthorizedKey],
algorithm: &[u8],
public_key: &[u8],
) -> bool
pub(crate) fn matches( keys: &[AuthorizedKey], algorithm: &[u8], public_key: &[u8], ) -> bool
Implements matches.
Sourcepub(crate) fn keys_fingerprint(keys: &[AuthorizedKey]) -> u64
pub(crate) fn keys_fingerprint(keys: &[AuthorizedKey]) -> u64
Implements keys fingerprint.
Trait Implementations§
Source§impl AuthProvider for PublicKeyAuth
impl AuthProvider for PublicKeyAuth
Implements authorize public key.
Auto Trait Implementations§
impl Freeze for PublicKeyAuth
impl RefUnwindSafe for PublicKeyAuth
impl Send for PublicKeyAuth
impl Sync for PublicKeyAuth
impl Unpin for PublicKeyAuth
impl UnsafeUnpin 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