PublicKeyCredentialCreationOptions

Struct PublicKeyCredentialCreationOptions 

Source
pub struct PublicKeyCredentialCreationOptions {
    pub rp: PublicKeyCredentialRpEntity,
    pub user: PublicKeyCredentialUserEntity,
    pub challenge: Bytes,
    pub pub_key_cred_params: Vec<PublicKeyCredentialParameters>,
    pub timeout: Option<u32>,
    pub exclude_credentials: Option<Vec<PublicKeyCredentialDescriptor>>,
    pub authenticator_selection: Option<AuthenticatorSelectionCriteria>,
    pub hints: Option<Vec<PublicKeyCredentialHints>>,
    pub attestation: AttestationConveyancePreference,
    pub attestation_formats: Option<Vec<AttestationStatementFormatIdentifiers>>,
    pub extensions: Option<AuthenticationExtensionsClientInputs>,
}
Expand description

Fields§

§rp: PublicKeyCredentialRpEntity

This member contains a name and an identifier for the Relying Party responsible for the request.

§user: PublicKeyCredentialUserEntity

This member contains names and an identifier for the user account performing the registration.

The value’s PublicKeyCredentialUserEntity::id can be returned as the AuthenticatorAssertionResponse::user_handle in some future authentication ceremonies. It is also used to overwrite existing discoverable credentials that have the same PublicKeyCredentialRpEntity::id and PublicKeyCredentialUserEntity::id on the same authenticator.

§challenge: Bytes

This member specifies a challenge that the authenticator signs, along with other data, when producing an AttestedCredentialData for the newly created credential.

See the Cryptographic Challenges security consideration.

§pub_key_cred_params: Vec<PublicKeyCredentialParameters>

This member lists the key types and signature algorithms the Relying Party supports, ordered from most preferred to least preferred. The client and authenticator make a best-effort to create a credential of the most preferred type possible. If none of the listed types can be created, the create() operation MUST fail.

Relying Parties that wish to support a wide range of authenticators SHOULD include at least the following COSEAlgorithmIdentifier values:

Additional signature algorithms can be included as needed.

§timeout: Option<u32>

This OPTIONAL member specifies a time, in milliseconds, that the Relying Party is willing to wait for the call to complete. This is treated as a hint, and MAY be overridden by the client.

§exclude_credentials: Option<Vec<PublicKeyCredentialDescriptor>>

The Relying Party SHOULD use this OPTIONAL member to list any existing credentials mapped to this user account (as identified by PublicKeyCredentialUserEntity::id). This ensures that the new credential is not created on an authenticator that already contains a credential mapped to this user account. If it would be, the client is requested to instead guide the user to use a different authenticator, or return an error if that fails.

§authenticator_selection: Option<AuthenticatorSelectionCriteria>

The Relying Party MAY use this OPTIONAL member to specify capabilities and settings that the authenticator MUST or SHOULD satisfy to participate in the create() operation.

For more information see AuthenticatorSelectionCriteria.

§hints: Option<Vec<PublicKeyCredentialHints>>

This OPTIONAL member contains zero or more elements from PublicKeyCredentialHints` to guide the user agent in interacting with the user.

This field ignores unknown hint values at deserialization.

§attestation: AttestationConveyancePreference

The Relying Party MAY use this OPTIONAL member to specify a preference regarding attestation conveyance. Its value SHOULD be a member of AttestationConveyancePreference. Client platforms MUST ignore unknown values, treating an unknown value as if the member does not exist, therefore acting as the default value.

The default value is AttestationConveyancePreference::None

§attestation_formats: Option<Vec<AttestationStatementFormatIdentifiers>>

The Relying Party MAY use this OPTIONAL member to specify a preference regarding the attestation statement format used by the authenticator. Values SHOULD be taken from the IANA “WebAuthn Attestation Statement Format Identifiers” registry IANA-WebAuthn-Registries established by RFC8809. Values are ordered from most preferable to least preferable. This parameter is advisory and the authenticator MAY use an attestation statement not enumerated in this parameter.

The default value is the empty list, which indicates no preference.

§extensions: Option<AuthenticationExtensionsClientInputs>

The Relying Party MAY use this OPTIONAL member to provide client extension inputs requesting additional processing by the client and authenticator. For example, the Relying Party may request that the client returns additional information about the credential that was created.

Trait Implementations§

Source§

impl Debug for PublicKeyCredentialCreationOptions

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for PublicKeyCredentialCreationOptions

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for PublicKeyCredentialCreationOptions

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,