crates/nornir-auth-webauthn/tests/no_webauthn_rs.rs
//! A34-32 (lane NIGHT-SAML): the webauthn-rs path is gone. Its serialisable
//! ceremony state carried the subject (so whoever held the state chose who
//! signed in) and it dropped the AuthenticationResult (so the signature
//! counter was never stored). `pure` and `ceremony` are the passkey paths.
//! This guard keeps it from coming back.
const MANIFEST: &str = include_str!("../Cargo.toml");
const LIB: &str = include_str!("../src/lib.rs");
#[test]
fn the_crate_links_no_webauthn_rs() {
for line in MANIFEST.lines().map(str::trim) {
assert!(
!line.starts_with("webauthn-rs")
&& !line.starts_with("webauthn-authenticator-rs")
&& !line.contains("dep:webauthn-rs"),
"Cargo.toml still names webauthn-rs: {line}"
);
assert!(
!line.starts_with("webauthn ="),
"Cargo.toml still has the webauthn-rs `webauthn` feature: {line}"
);
}
}
#[test]
fn the_library_has_no_webauthn_rs_provider() {
for gone in [
"webauthn_rs::",
"pub struct WebauthnProvider",
"pub struct WebauthnAuthState",
"danger-allow-state-serialisation",
] {
assert!(!LIB.contains(gone), "src/lib.rs still holds {gone:?}");
}
}