You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implements WebAuthn L3 §5.11 "Related Origins". When a request's rp.id
is not a registrable suffix of the caller's effective domain,
libwebauthn resolves the relying party's allowed origins and accepts the
request if one matches the caller.
Origin resolution is pluggable and the matching always runs in
libwebauthn. An optional reqwest-backed source fetches the RP's
`.well-known/webauthn` document behind the
`reqwest-related-origins-source` feature, so the core crate stays
HTTP-client-free. A caller that already has the list, such as a browser,
can supply its own source and skip the fetch. Related origins can also
be turned off.
Request building now takes its public-suffix-list and related-origins
dependencies through a settings value rather than positional parameters,
which keeps the API manageable as options grow. Existing call sites need
a small update for the new signature.
Closes#160. Based on #173 by @HarveyOrourke15.
|**Hybrid (caBLE v2)**| — |`cargo run --example webauthn_cable_wss`|
78
78
79
79
[^nfc]: `nfc-backend-pcsc` is pure userspace and recommended on most systems. `nfc-backend-libnfc` requires the `libnfc` system library. Both can be enabled together; the first FIDO device found by either backend is used.
80
80
81
+
[^ro]: The ceremony examples run with related origins disabled (they are same-origin, so it never applies). The bundled reqwest-backed [related-origins](https://www.w3.org/TR/webauthn-3/#sctn-related-origins) source is shown in the `webauthn_related_origins_hid` example below, behind the optional `reqwest-related-origins-source` feature. Consumers that ship their own HTTP stack can implement `HttpClient` or `RelatedOriginsSource` directly.
82
+
81
83
Additional HID-only examples cover specific FIDO2 features and authenticator management:
82
84
83
85
```
@@ -88,6 +90,9 @@ $ cargo run --example webauthn_prf_hid
88
90
$ cargo run --example prf_replay -- CREDENTIAL_ID FIRST_PRF_INPUT
89
91
$ cargo run --example device_selection_hid
90
92
93
+
# Related origins (reqwest-backed well-known fetch)
94
+
$ cargo run --features reqwest-related-origins-source --example webauthn_related_origins_hid
0 commit comments