aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRobin Krahl <robin.krahl@ireas.org>2018-05-29 21:09:15 +0000
committerRobin Krahl <robin.krahl@ireas.org>2018-05-29 23:10:28 +0200
commit1a0947f882505a15ab1d9d2d7b51db1cf85ea8b6 (patch)
tree6f478ec456f54baa877add7944fd825bc814670e /src
parent9897f2448ed6e62b755079c430a55a6b22bf5694 (diff)
downloadnitrokey-rs-1a0947f882505a15ab1d9d2d7b51db1cf85ea8b6.tar.gz
nitrokey-rs-1a0947f882505a15ab1d9d2d7b51db1cf85ea8b6.tar.bz2
Add Authenticate to the common traits extended by Device
Authenticate is supported by both the Nitrokey Pro and the Nitrokey Storage. Therefore Device should extend it.
Diffstat (limited to 'src')
-rw-r--r--src/device.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/device.rs b/src/device.rs
index 7d69df8..cd8a05a 100644
--- a/src/device.rs
+++ b/src/device.rs
@@ -1,3 +1,4 @@
+use auth::Authenticate;
use config::{Config, RawConfig};
use libc;
use nitrokey_sys;
@@ -148,7 +149,7 @@ pub struct Storage {}
///
/// This trait provides the commands that can be executed without authentication and that are
/// present on all supported Nitrokey devices.
-pub trait Device: GetPasswordSafe + GenerateOtp {
+pub trait Device: Authenticate + GetPasswordSafe + GenerateOtp {
/// Returns the serial number of the Nitrokey device. The serial number is the string
/// representation of a hex number.
///