pub struct RelyingParty { /* private fields */ }Expand description
A WebAuthn relying party a deployment accepts webauthn-p256
assertions for (§4.3 rule 4): its id, whose SHA-256 the authenticator
puts in authenticatorData, and the origins a clientDataJSON from it
may name.
Implementations§
Source§impl RelyingParty
impl RelyingParty
Sourcepub fn new<'a>(
id: &str,
origins: impl IntoIterator<Item = &'a str>,
) -> Result<RelyingParty, GrantError>
pub fn new<'a>( id: &str, origins: impl IntoIterator<Item = &'a str>, ) -> Result<RelyingParty, GrantError>
A relying party with id and its allowed origins.
id is a lowercase DNS name: dot-separated labels of a-z, 0-9 and
-, each 1 to 63 bytes without a leading or trailing -, at most 253
bytes in all, and a last label that is not all digits (a WebAuthn
relying-party id is a domain, never an IP address). Each origin is a
non-empty string of printable ASCII (0x21..=0x7E), compared byte for
byte with clientDataJSON.origin; there is at least one and no
duplicate. Origins are not otherwise parsed, so native-app origins
(for example android:apk-key-hash:…) can be listed.
§Errors
RelyingParty for any rule above.
Trait Implementations§
Source§impl Clone for RelyingParty
impl Clone for RelyingParty
Source§fn clone(&self) -> RelyingParty
fn clone(&self) -> RelyingParty
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more