yubico 0.1.4

Yubikey client API library
Documentation

Build Status Crates.io

Yubico

Yubikey client API library, validation protocol version 2.0.

Enables integration with the Yubico validation platform, so you can use Yubikey's one-time-password in your Rust application, allowing a user to authenticate via Yubikey.

Usage

Add this to your Cargo.toml

[dependencies]
yubico = "0.1"

Request your api key.

Example

extern crate yubico;

use yubico::Yubico;

fn main() {
   let yubi = Yubico::new("CLIENT_ID".into(), "API_KEY".into());
   let result = yubi.verify("OTP".into());
   match result {
      Ok(answer) => println!("{}", answer),
      Err(e) => println!("Error: {}", e),
   }
}

License

Licensed under either of