Struct pam_auth::Authenticator [] [src]

pub struct Authenticator<'a> {
    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> Authenticator<'a>
[src]

fn new(service: &str) -> Option<Authenticator>

Creates a new Authenticator with a given service name

fn set_credentials(&mut self, user: &'a str, password: &'a str)

Set the credentials which should be used in the authentication process. Currently only username/password combinations are supported

fn authenticate(&mut self) -> Result<(), PamReturnCode>

Perform the authentication with the provided credentials

fn open_session(&mut self) -> Result<(), PamReturnCode>

Open a session for a previously authenticated user and initialize the environment appropriately (in PAM and regular enviroment variables).

Trait Implementations

impl<'a> Drop for Authenticator<'a>
[src]

fn drop(&mut self)

A method called when the value goes out of scope. Read more