Move identity::signatures to json_signatures module

This commit is contained in:
silverpill 2023-03-14 20:47:27 +00:00
parent 8b8f1bb678
commit 1d4bb200d2
7 changed files with 22 additions and 16 deletions

View file

@ -11,7 +11,10 @@ use crate::identity::{
claims::create_identity_claim,
did::Did,
minisign::verify_minisign_identity_proof,
signatures::{PROOF_TYPE_ID_EIP191, PROOF_TYPE_ID_MINISIGN},
};
use crate::json_signatures::proofs::{
PROOF_TYPE_ID_EIP191,
PROOF_TYPE_ID_MINISIGN,
};
use crate::models::profiles::types::{
ExtraField,

View file

@ -10,14 +10,17 @@ use crate::http_signatures::verify::{
verify_http_signature,
HttpSignatureVerificationError as HttpSignatureError,
};
use crate::identity::{did::Did, signatures::ProofType};
use crate::json_signatures::verify::{
get_json_signature,
verify_ed25519_json_signature,
verify_eip191_json_signature,
verify_rsa_json_signature,
JsonSignatureVerificationError as JsonSignatureError,
JsonSigner,
use crate::identity::did::Did;
use crate::json_signatures::{
proofs::ProofType,
verify::{
get_json_signature,
verify_ed25519_json_signature,
verify_eip191_json_signature,
verify_rsa_json_signature,
JsonSignatureVerificationError as JsonSignatureError,
JsonSigner,
},
};
use crate::models::{
profiles::queries::get_profile_by_remote_actor_id,

View file

@ -3,4 +3,3 @@ pub mod did;
pub mod did_key;
pub mod did_pkh;
pub mod minisign;
pub mod signatures;

View file

@ -15,11 +15,11 @@ use mitra_utils::{
use crate::identity::{
did_key::DidKey,
did_pkh::DidPkh,
signatures::{
PROOF_TYPE_JCS_ED25519,
PROOF_TYPE_JCS_EIP191,
PROOF_TYPE_JCS_RSA,
},
};
use super::proofs::{
PROOF_TYPE_JCS_ED25519,
PROOF_TYPE_JCS_EIP191,
PROOF_TYPE_JCS_RSA,
};
pub(super) const PROOF_KEY: &str = "proof";

View file

@ -1,2 +1,3 @@
pub mod create;
pub mod proofs;
pub mod verify;

View file

@ -19,13 +19,13 @@ use crate::identity::{
did_key::DidKey,
did_pkh::DidPkh,
minisign::verify_ed25519_signature,
signatures::ProofType,
};
use super::create::{
IntegrityProof,
PROOF_KEY,
PROOF_PURPOSE,
};
use super::proofs::ProofType;
#[derive(Debug, PartialEq)]
pub enum JsonSigner {