mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-06-06 13:53:54 +02:00
76daee7aaf
* fix(deps): update tauri monorepo * Create tauri-beta-23.md * fix clippy - regen permissions * revert accidental cargo.toml change --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Fabian-Lars <fabianlars@fabianlars.de>
57 lines
1.4 KiB
Rust
57 lines
1.4 KiB
Rust
// Copyright 2021 Flavio Oliveira
|
|
// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
// As defined by FIDO U2F Javascript API.
|
|
// https://fidoalliance.org/specs/fido-u2f-v1.0-nfc-bt-amendment-20150514/fido-u2f-javascript-api.html#registration
|
|
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
#[derive(Serialize)]
|
|
#[serde(rename_all = "camelCase")]
|
|
pub struct U2fRegisterRequest {
|
|
pub app_id: String,
|
|
pub register_requests: Vec<RegisterRequest>,
|
|
pub registered_keys: Vec<RegisteredKey>,
|
|
}
|
|
|
|
#[derive(Serialize)]
|
|
pub struct RegisterRequest {
|
|
pub version: String,
|
|
pub challenge: String,
|
|
}
|
|
|
|
#[derive(Serialize)]
|
|
#[serde(rename_all = "camelCase")]
|
|
pub struct RegisteredKey {
|
|
pub version: String,
|
|
pub key_handle: Option<String>,
|
|
pub app_id: String,
|
|
}
|
|
|
|
#[derive(Deserialize)]
|
|
#[serde(rename_all = "camelCase")]
|
|
pub struct RegisterResponse {
|
|
pub registration_data: String,
|
|
#[allow(unused)]
|
|
pub version: String,
|
|
pub client_data: String,
|
|
}
|
|
|
|
#[derive(Serialize)]
|
|
#[serde(rename_all = "camelCase")]
|
|
pub struct U2fSignRequest {
|
|
pub app_id: String,
|
|
pub challenge: String,
|
|
pub registered_keys: Vec<RegisteredKey>,
|
|
}
|
|
|
|
#[derive(Clone, Deserialize)]
|
|
#[serde(rename_all = "camelCase")]
|
|
pub struct SignResponse {
|
|
pub key_handle: String,
|
|
pub signature_data: String,
|
|
pub client_data: String,
|
|
}
|