remove pam tester (#1197)

This commit is contained in:
Firstyear 2022-11-14 15:41:05 +10:00 committed by GitHub
parent 16cf340248
commit f120f383e2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 0 additions and 41 deletions

View file

@ -24,10 +24,6 @@ members = [
"sketching"
]
exclude = [
"kanidm_unix_int/pam_tester"
]
[workspace.package]
version = "1.1.0-alpha.11-dev"
authors = [

View file

@ -1,14 +0,0 @@
[package]
name = "pam_tester"
version.workspace = true
authors.workspace = true
rust-version.workspace = true
edition.workspace = true
license.workspace = true
homepage.workspace = true
repository.workspace = true
[dependencies]
pam = "^0.7.0"

View file

@ -1,23 +0,0 @@
extern crate pam;
pub fn main() {
let service = "pam_test";
let user = "testuser";
let password = "eti8aoshaigeeboh1ohF7rieba0quaThesoivae0";
let mut auth = pam::Authenticator::with_password(service).unwrap();
auth.get_handler().set_credentials(user, password);
let r = auth.authenticate();
println!("auth -> {:?}", r);
if r.is_ok() {
println!("Successfully authenticated!");
let r = auth.open_session();
println!("session -> {:?}", r);
if r.is_ok() {
println!("Successfully opened session!");
} else {
println!("Session failed =/");
}
} else {
println!("Authentication failed =/");
}
}