Skip to content

Commit

Permalink
Check signed DID suffix in deactivate
Browse files Browse the repository at this point in the history
  • Loading branch information
clehner committed Feb 11, 2022
1 parent 9b1dd8f commit 1cd9f2c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion did-ion/src/sidetree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -606,14 +606,15 @@ impl SidetreeOperation for DeactivateOperation {
computed_reveal_value,
self.reveal_value,
);
ensure!(self.did_suffix == claims.did_suffix, "DID Suffix mismatch");
Ok(claims)
}
}

/// [DID Suffix](https://identity.foundation/sidetree/spec/v1.0.0/#did-suffix)
///
/// Unique identifier string within a Sidetree DID (short or long-form)
#[derive(Debug, Serialize, Deserialize, Clone)]
#[derive(Debug, Serialize, Deserialize, Clone, PartialEq)]
pub struct DIDSuffix(pub String);

/// A Sidetree-based DID
Expand Down

0 comments on commit 1cd9f2c

Please sign in to comment.