#[non_exhaustive]pub enum PublicKeyCredentialHints {
SecurityKey,
ClientDevice,
Hybrid,
}Expand description
WebAuthn Relying Parties may use this enumeration to communicate hints to the user-agent about how a request may be best completed. These hints are not requirements, and do not bind the user-agent, but may guide it in providing the best experience by using contextual information that the Relying Party has about the request. Hints are provided in order of decreasing preference so, if two hints are contradictory, the first one controls. Hints may also overlap: if a more-specific hint is defined a Relying Party may still wish to send less specific ones for user-agents that may not recognise the more specific one. In this case the most specific hint should be sent before the less-specific ones.
Hints MAY contradict information contained in AuthenticatorTransport and AuthenticatorAttachment.
When this occurs, the hints take precedence. (Note that transports values are not provided when
using discoverable credentials, leaving hints as the only avenue for expressing some aspects of
such a request.)
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
SecurityKey
Indicates that the Relying Party believes that users will satisfy this request with a physical security key. For example, an enterprise Relying Party may set this hint if they have issued security keys to their employees and will only accept those authenticators for registration and authentication.
For compatibility with older user agents, when this hint is used in PublicKeyCredentialCreationOptions,
the authenticatorAttachment SHOULD be set to AuthenticatorAttachment::CrossPlatform.
ClientDevice
Indicates that the Relying Party believes that users will satisfy this request with a platform authenticator attached to the client device.
For compatibility with older user agents, when this hint is used in PublicKeyCredentialCreationOptions,
the authenticatorAttachment SHOULD be set to AuthenticatorAttachment::Platform.
Hybrid
Indicates that the Relying Party believes that users will satisfy this request with general-purpose authenticators such as smartphones. For example, a consumer Relying Party may believe that only a small fraction of their customers possesses dedicated security keys. This option also implies that the local platform authenticator should not be promoted in the UI.
For compatibility with older user agents, when this hint is used in PublicKeyCredentialCreationOptions,
the authenticatorAttachment SHOULD be set to AuthenticatorAttachment::CrossPlatform.
Trait Implementations§
Source§impl Clone for PublicKeyCredentialHints
impl Clone for PublicKeyCredentialHints
Source§fn clone(&self) -> PublicKeyCredentialHints
fn clone(&self) -> PublicKeyCredentialHints
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PublicKeyCredentialHints
impl Debug for PublicKeyCredentialHints
Source§impl<'de> Deserialize<'de> for PublicKeyCredentialHints
impl<'de> Deserialize<'de> for PublicKeyCredentialHints
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for PublicKeyCredentialHints
impl PartialEq for PublicKeyCredentialHints
Source§impl Serialize for PublicKeyCredentialHints
impl Serialize for PublicKeyCredentialHints
impl Copy for PublicKeyCredentialHints
impl Eq for PublicKeyCredentialHints
impl StructuralPartialEq for PublicKeyCredentialHints
Auto Trait Implementations§
impl Freeze for PublicKeyCredentialHints
impl RefUnwindSafe for PublicKeyCredentialHints
impl Send for PublicKeyCredentialHints
impl Sync for PublicKeyCredentialHints
impl Unpin for PublicKeyCredentialHints
impl UnwindSafe for PublicKeyCredentialHints
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.