apple-localauthentication 0.3.5

Safe Rust bindings for Apple's LocalAuthentication framework — contexts, rights, persisted secrets, keys, and credentials on macOS
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use localauthentication::prelude::*;

#[test]
fn right_tag_state_and_preflight_are_accessible() -> Result<(), Box<dyn std::error::Error>> {
    let right = LARight::new()?;
    right.set_tag(99)?;

    assert_eq!(right.tag()?, 99);
    let _ = right.state()?;
    let _ = right.check_can_authorize();
    right.deauthorize()?;
    Ok(())
}