refactor(client-auth): introduce ClientId newtype to avoid client_id/nonce confusion

refactor(user-agent): replace manual terminality helper with fatality::Fatality
This commit is contained in:
CleverWild
2026-03-19 19:07:19 +01:00
parent e1a8553142
commit 971db0e919
4 changed files with 112 additions and 43 deletions

139
server/Cargo.lock generated
View File

@@ -100,7 +100,7 @@ dependencies = [
"serde",
"serde_json",
"serde_with",
"thiserror",
"thiserror 2.0.18",
]
[[package]]
@@ -136,7 +136,7 @@ dependencies = [
"futures",
"futures-util",
"serde_json",
"thiserror",
"thiserror 2.0.18",
]
[[package]]
@@ -178,7 +178,7 @@ dependencies = [
"alloy-rlp",
"crc",
"serde",
"thiserror",
"thiserror 2.0.18",
]
[[package]]
@@ -203,7 +203,7 @@ dependencies = [
"alloy-rlp",
"borsh",
"serde",
"thiserror",
"thiserror 2.0.18",
]
[[package]]
@@ -239,7 +239,7 @@ dependencies = [
"serde",
"serde_with",
"sha2 0.10.9",
"thiserror",
"thiserror 2.0.18",
]
[[package]]
@@ -280,7 +280,7 @@ dependencies = [
"http",
"serde",
"serde_json",
"thiserror",
"thiserror 2.0.18",
"tracing",
]
@@ -307,7 +307,7 @@ dependencies = [
"futures-utils-wasm",
"serde",
"serde_json",
"thiserror",
"thiserror 2.0.18",
]
[[package]]
@@ -382,7 +382,7 @@ dependencies = [
"reqwest",
"serde",
"serde_json",
"thiserror",
"thiserror 2.0.18",
"tokio",
"tracing",
"url",
@@ -475,7 +475,7 @@ dependencies = [
"serde",
"serde_json",
"serde_with",
"thiserror",
"thiserror 2.0.18",
]
[[package]]
@@ -501,7 +501,7 @@ dependencies = [
"either",
"elliptic-curve",
"k256",
"thiserror",
"thiserror 2.0.18",
]
[[package]]
@@ -517,7 +517,7 @@ dependencies = [
"async-trait",
"k256",
"rand 0.8.5",
"thiserror",
"thiserror 2.0.18",
]
[[package]]
@@ -608,7 +608,7 @@ dependencies = [
"parking_lot",
"serde",
"serde_json",
"thiserror",
"thiserror 2.0.18",
"tokio",
"tower",
"tracing",
@@ -644,7 +644,7 @@ dependencies = [
"nybbles",
"serde",
"smallvec",
"thiserror",
"thiserror 2.0.18",
"tracing",
]
@@ -684,8 +684,9 @@ dependencies = [
"async-trait",
"ed25519-dalek",
"http",
"rand 0.10.0",
"rustls-webpki",
"thiserror",
"thiserror 2.0.18",
"tokio",
"tokio-stream",
"tonic",
@@ -708,7 +709,7 @@ dependencies = [
"rcgen",
"rstest",
"rustls-pki-types",
"thiserror",
"thiserror 2.0.18",
"tokio",
"tonic",
"tonic-prost",
@@ -733,6 +734,7 @@ dependencies = [
"diesel-async",
"diesel_migrations",
"ed25519-dalek",
"fatality",
"futures",
"insta",
"k256",
@@ -751,7 +753,7 @@ dependencies = [
"spki",
"strum",
"test-log",
"thiserror",
"thiserror 2.0.18",
"tokio",
"tokio-stream",
"tonic",
@@ -761,13 +763,6 @@ dependencies = [
"zeroize",
]
[[package]]
name = "arbiter-terrors-poc"
version = "0.1.0"
dependencies = [
"terrors",
]
[[package]]
name = "arbiter-tokens-registry"
version = "0.1.0"
@@ -791,7 +786,7 @@ dependencies = [
"sha2 0.10.9",
"smlang",
"spki",
"thiserror",
"thiserror 2.0.18",
"tokio",
"tokio-stream",
"tonic",
@@ -1019,7 +1014,7 @@ dependencies = [
"nom",
"num-traits",
"rusticata-macros",
"thiserror",
"thiserror 2.0.18",
"time",
]
@@ -2079,6 +2074,21 @@ dependencies = [
"windows-sys 0.61.2",
]
[[package]]
name = "expander"
version = "2.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e2c470c71d91ecbd179935b24170459e926382eaaa86b590b78814e180d8a8e2"
dependencies = [
"blake2",
"file-guard",
"fs-err",
"prettyplease",
"proc-macro2",
"quote",
"syn 2.0.117",
]
[[package]]
name = "fastrand"
version = "2.3.0"
@@ -2107,6 +2117,30 @@ dependencies = [
"bytes",
]
[[package]]
name = "fatality"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec6f82451ff7f0568c6181287189126d492b5654e30a788add08027b6363d019"
dependencies = [
"fatality-proc-macro",
"thiserror 1.0.69",
]
[[package]]
name = "fatality-proc-macro"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eb42427514b063d97ce21d5199f36c0c307d981434a6be32582bc79fe5bd2303"
dependencies = [
"expander",
"indexmap 2.13.0",
"proc-macro-crate",
"proc-macro2",
"quote",
"syn 2.0.117",
]
[[package]]
name = "ff"
version = "0.13.1"
@@ -2129,6 +2163,16 @@ version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "64cd1e32ddd350061ae6edb1b082d7c54915b5c672c389143b9a63403a109f24"
[[package]]
name = "file-guard"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "21ef72acf95ec3d7dbf61275be556299490a245f017cf084bd23b4f68cf9407c"
dependencies = [
"libc",
"winapi",
]
[[package]]
name = "find-msvc-tools"
version = "0.1.9"
@@ -2190,6 +2234,15 @@ dependencies = [
"percent-encoding",
]
[[package]]
name = "fs-err"
version = "2.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "88a41f105fe1d5b6b34b2055e3dc59bb79b46b48b2040b9e6c7b4b5de097aa41"
dependencies = [
"autocfg",
]
[[package]]
name = "fs_extra"
version = "1.3.0"
@@ -3784,7 +3837,7 @@ dependencies = [
"rustc-hash",
"rustls",
"socket2",
"thiserror",
"thiserror 2.0.18",
"tokio",
"tracing",
"web-time",
@@ -3805,7 +3858,7 @@ dependencies = [
"rustls",
"rustls-pki-types",
"slab",
"thiserror",
"thiserror 2.0.18",
"tinyvec",
"tracing",
"web-time",
@@ -4140,7 +4193,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a8a1f2315036ef6b1fbacd1972e8ee7688030b0a2121edfc2a6550febd41574d"
dependencies = [
"hashbrown 0.16.1",
"thiserror",
"thiserror 2.0.18",
]
[[package]]
@@ -4863,12 +4916,6 @@ dependencies = [
"windows-sys 0.60.2",
]
[[package]]
name = "terrors"
version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "987fd8c678ca950df2a18b2c6e9da6ca511d449278fab3565efe0d49c0c07a5d"
[[package]]
name = "test-log"
version = "0.2.19"
@@ -4900,13 +4947,33 @@ dependencies = [
"unicode-width 0.2.2",
]
[[package]]
name = "thiserror"
version = "1.0.69"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52"
dependencies = [
"thiserror-impl 1.0.69",
]
[[package]]
name = "thiserror"
version = "2.0.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4"
dependencies = [
"thiserror-impl",
"thiserror-impl 2.0.18",
]
[[package]]
name = "thiserror-impl"
version = "1.0.69"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.117",
]
[[package]]
@@ -6000,7 +6067,7 @@ dependencies = [
"nom",
"oid-registry",
"rusticata-macros",
"thiserror",
"thiserror 2.0.18",
"time",
]