pam-auth Version Build Status

Safe Rust bindings to Linux Pluggable Authentication Modules (PAM). Currently only supports basic username/password authentication.

Documentation @ gh-pages

Usage

  1. Add pam-auth to your Cargo.toml: toml [dependencies] pam-auth = "0.2.0"
  2. Use the Authenticator struct to authenticate and open a session ```rust extern crate pam_auth; pub fn main() { let service: ""; let user: ""; let password: "";

    let mut auth = pam_auth::Authenticator::new(service);
    auth.set_credentials(user, password);
    if auth.authenticate().is_ok() && auth.open_session().is_ok() {
        println!("Successfully opened a session!");
    }
    else {
        println!("Authentication failed =/");
    }
    

    } ```

TODO: