[package] name = "slauth" version = "0.7.10" authors = ["richer ", "LucFauvel "] edition = "2021" description = "oath HOTP and TOTP complient implementation" documentation = "https://docs.rs/slauth" homepage = "https://github.com/devolutions/slauth" repository = "https://github.com/devolutions/slauth" readme = "README.md" keywords = ["TOTP", "HOTP", "2FA", "MFA", "WebAuthn"] license = "MIT" [lib] name = "slauth" crate-type = ["lib", "staticlib", "cdylib"] [features] default = ["u2f-server", "webauthn-server", "native-bindings"] native-bindings = [] u2f-server = ["u2f", "webpki"] u2f = ["auth-base", "untrusted", "serde_repr", ] webauthn-server = [ "webauthn", "webpki" ] webauthn = [ "auth-base", "bytes", "serde_cbor", "uuid", "http", "ed25519-dalek", "p256", "indexmap" ] auth-base = ["base64", "byteorder", "ring", "serde", "serde_derive", "serde_json", "serde_bytes"] android = ["jni"] [dependencies] sha2 = {version = "0.10" , features = ["oid"]} hmac = { version = "0.12", features = ["reset"] } sha-1 = {version = "0.10" , features = ["oid"]} time = "0.3" base32 = "0.4" hex = "0.4" rsa = "0.9.2" rand = "0.8.5" x509-parser = "0.15.0" base64 = { version = "0.13", optional = true } byteorder = { version = "1.4", optional = true } ring = { version = "0.16", optional = true } untrusted = { version = "0.9.0", optional = true } serde = { version = "1.0", optional = true } serde_repr = { version = "0.1", optional = true } serde_derive = { version = "1.0", optional = true } serde_bytes = { version = "0.11", optional = true } serde_json = { version = "1.0", optional = true } serde_cbor = { version = "0.11", optional = true } webpki = { version = "0.22", optional = true, features = ["alloc"] } bytes = { version = "1.2", optional = true } http = { version = "1.0", optional = true } uuid = { version = "1.6", optional = true } ed25519-dalek = { version = "2.1.0", features = ["rand_core", "pkcs8"], optional = true } p256 = { version = "0.13.2", optional = true } indexmap = { version = "2.2.6", features = ["serde"], optional = true } [target.'cfg(target_os = "android")'.dependencies] jni = { version = "0.21.1", optional = true } [target.'cfg(target_arch="wasm32")'.dependencies] wasm-bindgen = { version = "0.2.91" } js-sys = "0.3.37" # FIXME: https://docs.rs/getrandom/0.2.2/getrandom/#webassembly-support # let `getrandom` know that JavaScript is available for our targets # `getrandom` is not used directly, but by adding the right feature here # it will be compiled with it in our dependencies as well (since union of # all the features selected is used when building a Cargo project) getrandom = { version = "0.2", features = ["js"] } serde-wasm-bindgen = "0.6.3" [target.'cfg(target_arch="wasm32")'.dev-dependencies] wasm-bindgen-test = "0.3.10" [target.'cfg(not(target_arch="wasm32"))'.dev-dependencies] saphir = { version = "3.1.0", git = "https://github.com/richerarc/saphir.git", tag = "v3.1.0", features = ["full"] } # not released on crates.io yet, required for dependancies tokio = { version = "1", features = ["full"] } async-stream = ">= 0.3, < 0.3.4" # 0.3.4 and up currently break saphir [dev-dependencies] serde_json = "1.0" serde_cbor = "0.11" uuid = "1.2" rand = "0.8" bytes = "1.2" #[package.metadata.wasm-pack.profile.release] #wasm-opt = false