Skip to content

Commit

Permalink
Test: Validate constructed identity requests
Browse files Browse the repository at this point in the history
Before this we only verified that the result has the correct JSON format.
  • Loading branch information
bisgardo committed Mar 19, 2024
1 parent cb30d87 commit 9049f01
Show file tree
Hide file tree
Showing 2 changed files with 124 additions and 92 deletions.
12 changes: 6 additions & 6 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ pub fn verifiable_credential_backup_encryption_key_hex(
/// UniFFI compatible bridge to [`IdentityObjectRequestInput`],
/// providing the implementation of the UDL declaration of the same name.
/// The translation is performed using Serde.
#[derive(Debug, Serialize)]
#[derive(Clone, Debug, Serialize)]
pub struct IdentityIssuanceRequestParameters {
#[serde(rename = "ipInfo")]
pub ip_info: IdentityProviderInfo,
Expand All @@ -202,7 +202,7 @@ pub struct IdentityIssuanceRequestParameters {
/// UniFFI compatible bridge to [`IdentityRecoveryRequestInput`],
/// providing the implementation of the UDL declaration of the same name.
/// The translation is performed using Serde.
#[derive(Debug, Serialize)]
#[derive(Clone, Debug, Serialize)]
pub struct IdentityRecoveryRequestParameters {
#[serde(rename = "ipInfo")]
pub ip_info: IdentityProviderInfo,
Expand All @@ -217,7 +217,7 @@ pub struct IdentityRecoveryRequestParameters {
/// UniFFI compatible bridge to [`concordium_base::id::types::IpInfo<concordium_base::id::constants::IpPairing>`],
/// providing the implementation of the UDL declaration of the same name.
/// The translation is performed using Serde.
#[derive(Debug, Serialize)]
#[derive(Clone, Debug, Serialize)]
pub struct IdentityProviderInfo {
#[serde(rename = "ipIdentity")]
pub identity: u32,
Expand All @@ -232,7 +232,7 @@ pub struct IdentityProviderInfo {
/// UniFFI compatible bridge to [`concordium_base::id::types::GlobalContext<concordium_base::id::constants::ArCurve>`],
/// providing the implementation of the UDL declaration of the same name.
/// The translation is performed using Serde.
#[derive(Debug, Serialize)]
#[derive(Clone, Debug, Serialize)]
pub struct GlobalContext {
#[serde(rename = "onChainCommitmentKey")]
pub on_chain_commitment_key_hex: String,
Expand All @@ -245,7 +245,7 @@ pub struct GlobalContext {
/// UniFFI compatible bridge to [`concordium_base::id::types::ArInfo<concordium_base::id::constants::ArCurve>`],
/// providing the implementation of the UDL declaration of the same name.
/// The translation is performed using Serde.
#[derive(Debug, Serialize)]
#[derive(Clone, Debug, Serialize)]
pub struct AnonymityRevokerInfo {
#[serde(rename = "arIdentity")]
pub identity: u32,
Expand All @@ -258,7 +258,7 @@ pub struct AnonymityRevokerInfo {
/// UniFFI compatible bridge to [`concordium_base::id::types::Description`],
/// providing the implementation of the UDL declaration of the same name.
/// The translation is performed using Serde.
#[derive(Debug, Serialize)]
#[derive(Clone, Debug, Serialize)]
pub struct Description {
#[serde(rename = "name")]
pub name: String,
Expand Down
Loading

0 comments on commit 9049f01

Please sign in to comment.