pub struct AuthenticationVerificationOptions<'origins, 'top_origins, O, T> {
pub allowed_origins: &'origins [O],
pub allowed_top_origins: Option<&'top_origins [T]>,
pub backup_state_requirement: BackupStateReq,
pub error_on_unsolicited_extensions: bool,
pub auth_attachment_enforcement: AuthenticatorAttachmentEnforcement,
pub update_uv: bool,
pub sig_counter_enforcement: SignatureCounterEnforcement,
pub client_data_json_relaxed: bool,
}Expand description
Additional verification options to perform in DiscoverableAuthenticationServerState::verify and
NonDiscoverableAuthenticationServerState::verify.
Fields§
§allowed_origins: &'origins [O]Origins to use for origin validation.
When this is empty, the origin that will be used will be based on the RpId passed to
DiscoverableAuthenticationServerState::verify or NonDiscoverableAuthenticationServerState::verify.
If RpId::Domain or RpId::StaticDomain, then the DomainOrigin returned from passing
AsciiDomain::as_ref and AsciiDomainStatic::as_str to DomainOrigin::new respectively will be
used; otherwise the Url in RpId::Url will be used.
allowed_top_origins: Option<&'top_origins [T]>Top-level origins to use for origin validation.
When this is Some, CollectedClientData::cross_origin is allowed to be true. When the contained
slice is empty, CollectedClientData::top_origin must be None. When this is None,
CollectedClientData::cross_origin must be false and CollectedClientData::top_origin must be None.
backup_state_requirement: BackupStateReqThe required Backup state of the credential.
error_on_unsolicited_extensions: boolError when unsolicited extensions are sent back iff true.
auth_attachment_enforcement: AuthenticatorAttachmentEnforcementDictates what happens when Authentication::authenticator_attachment is not the same as
DynamicState::authenticator_attachment.
update_uv: boolDynamicState::user_verified will be set to true iff Flag::user_verified when true.
sig_counter_enforcement: SignatureCounterEnforcementDictates what happens when AuthenticatorData::sign_count is not updated to a strictly greater value.
client_data_json_relaxed: boolserde_relaxed only.CollectedClientData::from_client_data_json_relaxed is used to extract CollectedClientData iff true.
Implementations§
Source§impl<O, T> AuthenticationVerificationOptions<'_, '_, O, T>
impl<O, T> AuthenticationVerificationOptions<'_, '_, O, T>
Sourcepub const fn new() -> Self
pub const fn new() -> Self
Returns Self such that Self::allowed_origins is empty, Self::allowed_top_origins is None,
Self::backup_state_requirement is BackupStateReq::None, Self::error_on_unsolicited_extensions is
true, Self::auth_attachment_enforcement is AuthenticatorAttachmentEnforcement::default,
Self::update_uv is false, Self::sig_counter_enforcement is
SignatureCounterEnforcement::default, and Self::client_data_json_relaxed is true.
Note O and T should implement PartialEq<Origin<'_>> (e.g., &str).