mirror of
https://github.com/kanidm/kanidm.git
synced 2025-02-23 04:27:02 +01:00
Cleanup webauthn features (#3285)
This commit is contained in:
parent
4ee9a3a098
commit
60cc830ebd
|
@ -284,7 +284,6 @@ uuid = "^1.11.0"
|
|||
webauthn-authenticator-rs = { version = "0.5.0", features = [
|
||||
"softpasskey",
|
||||
"softtoken",
|
||||
"mozilla",
|
||||
] }
|
||||
webauthn-rs = { version = "0.5.0", features = ["preview-features"] }
|
||||
webauthn-rs-core = "0.5.0"
|
||||
|
|
|
@ -78,9 +78,25 @@ url = { workspace = true }
|
|||
workspace = true
|
||||
features = ["win10"]
|
||||
|
||||
[target."cfg(not(any(target_os = \"windows\")))".dependencies.webauthn-authenticator-rs]
|
||||
[target."cfg(target_os = \"linux\")".dependencies.webauthn-authenticator-rs]
|
||||
workspace = true
|
||||
features = ["u2fhid"]
|
||||
features = [
|
||||
"u2fhid",
|
||||
"mozilla",
|
||||
]
|
||||
|
||||
[target."cfg(target_os = \"macos\")".dependencies.webauthn-authenticator-rs]
|
||||
workspace = true
|
||||
features = [
|
||||
"u2fhid",
|
||||
"mozilla",
|
||||
]
|
||||
|
||||
[target."cfg(target_os = \"freebsd\")".dependencies.webauthn-authenticator-rs]
|
||||
workspace = true
|
||||
features = [
|
||||
"mozilla",
|
||||
]
|
||||
|
||||
## Debian packaging
|
||||
[package.metadata.deb]
|
||||
|
|
|
@ -1,6 +1,16 @@
|
|||
#[cfg(not(any(target_os = "windows")))]
|
||||
#[cfg(target_os = "linux")]
|
||||
mod u2fhid;
|
||||
#[cfg(target_os = "linux")]
|
||||
use u2fhid::get_authenticator_backend;
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
mod mozilla;
|
||||
#[cfg(not(any(target_os = "windows")))]
|
||||
#[cfg(target_os = "macos")]
|
||||
use mozilla::get_authenticator_backend;
|
||||
|
||||
#[cfg(target_os = "freebsd")]
|
||||
mod mozilla;
|
||||
#[cfg(target_os = "freebsd")]
|
||||
use mozilla::get_authenticator_backend;
|
||||
|
||||
#[cfg(target_os = "windows")]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use webauthn_authenticator_rs::u2fhid::U2FHid;
|
||||
use webauthn_authenticator_rs::mozilla::MozillaAuthenticator;
|
||||
|
||||
pub fn get_authenticator_backend() -> U2FHid {
|
||||
U2FHid::new()
|
||||
pub fn get_authenticator_backend() -> MozillaAuthenticator {
|
||||
MozillaAuthenticator::default()
|
||||
}
|
||||
|
|
5
tools/cli/src/cli/webauthn/u2fhid.rs
Normal file
5
tools/cli/src/cli/webauthn/u2fhid.rs
Normal file
|
@ -0,0 +1,5 @@
|
|||
use webauthn_authenticator_rs::u2fhid::U2FHid;
|
||||
|
||||
pub fn get_authenticator_backend() -> U2FHid {
|
||||
U2FHid::new()
|
||||
}
|
Loading…
Reference in a new issue