pub struct IdentityFilter { /* private fields */ }Expand description
An IdentityFilter can determine if an Identity provided by the ssh-agent is trusted or not by this plugin. It is constructed from files or commands providing regular ssh keys or cert-authority keys.
Implementations§
Source§impl IdentityFilter
impl IdentityFilter
Sourcepub fn new(
authorized_keys_file: &Path,
ca_keys_file: Option<&Path>,
authorized_keys_command: Option<&str>,
authorized_keys_command_user: Option<&str>,
calling_user: &str,
) -> Result<Self>
pub fn new( authorized_keys_file: &Path, ca_keys_file: Option<&Path>, authorized_keys_command: Option<&str>, authorized_keys_command_user: Option<&str>, calling_user: &str, ) -> Result<Self>
Construct a new Identity filter where path is the path to a file in authorized_keys format, and the ca_keys_file is an optional path to a file containing cert-authority keys. See README.md for the details on the expected file format.
Sourcepub fn filter(&self, identity: &Identity<'_>) -> bool
pub fn filter(&self, identity: &Identity<'_>) -> bool
Returns true if the provided Identity is a PublicKey and this filter is configured with the same public key, or if the Identity is a Certificate and this filter is configured with a matching cert authority key. Please note that for certificates this is not enough, see auth::validate_cert for more information.
Auto Trait Implementations§
impl Freeze for IdentityFilter
impl RefUnwindSafe for IdentityFilter
impl Send for IdentityFilter
impl Sync for IdentityFilter
impl Unpin for IdentityFilter
impl UnsafeUnpin for IdentityFilter
impl UnwindSafe for IdentityFilter
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