diff --git a/common/authenticator-requests/src/v1/response.rs b/common/authenticator-requests/src/v1/response.rs index 1e26c4c34c..41e7f2473d 100644 --- a/common/authenticator-requests/src/v1/response.rs +++ b/common/authenticator-requests/src/v1/response.rs @@ -51,10 +51,30 @@ impl AuthenticatorResponse { use bincode::Options; make_bincode_serializer().deserialize(&message.message) } + + pub fn id(&self) -> Option { + match &self.data { + AuthenticatorResponseData::PendingRegistration(registration_data) => {} + AuthenticatorResponseData::Registered => None, + } + } } #[derive(Clone, Debug, Serialize, Deserialize)] pub enum AuthenticatorResponseData { - PendingRegistration(RegistrationData), - Registered, + PendingRegistration(PendingRegistrationResponse), + Registered(RegisteredResponse), +} + +#[derive(Clone, Debug, Serialize, Deserialize)] +pub struct PendingRegistrationResponse { + pub request_id: u64, + pub reply_to: Recipient, + pub reply: RegistrationData, +} + +#[derive(Clone, Debug, Serialize, Deserialize)] +pub struct RegisteredResponse { + pub request_id: u64, + pub reply_to: Recipient, }