Struct passkey_types::u2f::AuthenticationRequest
source · pub struct AuthenticationRequest {
pub parameter: AuthenticationParameter,
pub challenge: [u8; 32],
pub application: [u8; 32],
pub key_handle: Vec<u8>,
}Expand description
This message is used to initiate a U2F token authentication. The FIDO Client first contacts the relying party to obtain a challenge, and then constructs the authentication request message.
Fields§
§parameter: AuthenticationParameterDuring registration, the FIDO Client MAY send authentication request messages to the U2F
token to figure out whether the U2F token has already been registered. In this case, the
FIDO client will use the AuthenticationParameter::CheckOnly value for the control byte.
In all other cases (i.e., during authentication), the FIDO Client MUST use the
AuthenticationParameter::EnforceUserPresence or
AuthenticationParameter::DontEnforceUserPresence
challenge: [u8; 32]The challenge parameter is the SHA-256 hash of the Client Data, a stringified JSON data structure that the FIDO Client prepares. Among other things, the Client Data contains the challenge from the relying party (hence the name of the parameter).
application: [u8; 32]The application parameter is the SHA-256 hash of the UTF-8 encoding of the application identity of the application requesting the authentication as provided by the relying party.
key_handle: Vec<u8>This is provided by the relying party, and was obtained by the relying party during registration.
Implementations§
source§impl AuthenticationRequest
impl AuthenticationRequest
sourcepub fn try_from(
data: &[u8],
parameter: impl Into<AuthenticationParameter>
) -> Result<Self, TryFromSliceError>
pub fn try_from( data: &[u8], parameter: impl Into<AuthenticationParameter> ) -> Result<Self, TryFromSliceError>
Try parsing a data payload into an authentication request with the given parameter taken from the u2f message frame.