Struct pam_auth::Authenticator [−][src]
pub struct Authenticator<'a, 'b> { pub close_on_drop: bool, // some fields omitted }
Main struct to authenticate a user Currently closes the session on drop() but this might change!
Fields
close_on_drop: bool
Flag indicating whether the Authenticator should close the session on drop
Methods
impl<'a, 'b> Authenticator<'a, 'b>
[src]
impl<'a, 'b> Authenticator<'a, 'b>
pub fn new(service: &str) -> Option<Authenticator>
[src]
pub fn new(service: &str) -> Option<Authenticator>
Creates a new Authenticator with a given service name
pub fn set_credentials(&mut self, user: &'b str, password: &'b str)
[src]
pub fn set_credentials(&mut self, user: &'b str, password: &'b str)
Set the credentials which should be used in the authentication process. Currently only username/password combinations are supported
pub fn authenticate(&mut self) -> Result<()>
[src]
pub fn authenticate(&mut self) -> Result<()>
Perform the authentication with the provided credentials
pub fn open_session(&mut self) -> Result<()>
[src]
pub fn open_session(&mut self) -> Result<()>
Open a session for a previously authenticated user and initialize the environment appropriately (in PAM and regular enviroment variables).
Trait Implementations
impl<'a, 'b> Drop for Authenticator<'a, 'b>
[src]
impl<'a, 'b> Drop for Authenticator<'a, 'b>
Auto Trait Implementations
impl<'a, 'b> Send for Authenticator<'a, 'b>
impl<'a, 'b> Send for Authenticator<'a, 'b>
impl<'a, 'b> Sync for Authenticator<'a, 'b>
impl<'a, 'b> Sync for Authenticator<'a, 'b>