-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathCargo.toml
More file actions
112 lines (102 loc) · 3.36 KB
/
Copy pathCargo.toml
File metadata and controls
112 lines (102 loc) · 3.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
[package]
name = "slauth"
version = "0.7.22"
authors = [
"richer <richer.arc@gmail.com>",
"LucFauvel <luc.fauvel@hotmail.com>",
]
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.5"
hex = "0.4"
rsa = "0.9.8"
rand_core = "0.6.4"
x509-parser = "0.17.0"
base64 = { version = "0.22", optional = true }
byteorder = { version = "1.5", optional = true }
ring = { version = "0.17", 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.10", optional = true }
http = { version = "1.3", optional = true }
uuid = { version = "1.18", optional = true }
ed25519-dalek = { version = "2.2.0", features = [
"rand_core",
"pkcs8",
], optional = true }
p256 = { version = "0.13.2", optional = true }
indexmap = { version = "2.12.0", 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.104" }
js-sys = "0.3.81"
# 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.5"
[target.'cfg(target_arch="wasm32")'.dev-dependencies]
wasm-bindgen-test = "0.3.54"
[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.18"
rand = "0.9"
bytes = "1.10"
#[package.metadata.wasm-pack.profile.release]
#wasm-opt = false