Skip to content

Commit

Permalink
refactor: use from_jsonwebtoken_algorithm_to_jwsalgorithm
Browse files Browse the repository at this point in the history
  • Loading branch information
nanderstabel committed Jul 31, 2024
1 parent 9503181 commit 747bcf7
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions agent_shared/src/domain_linkage/mod.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
pub mod verifiable_credential_jwt;

use base64::{engine::general_purpose::URL_SAFE_NO_PAD, Engine};
use identity_iota::verification::jws::JwsAlgorithm;
use std::str::FromStr;
use std::time::{SystemTime, UNIX_EPOCH};

use crate::error::SharedError;
use crate::from_jsonwebtoken_algorithm_to_jwsalgorithm;
use did_manager::SecretManager;
use identity_core::common::{Duration, Timestamp};
use identity_credential::credential::{Credential, Jwt};
Expand Down Expand Up @@ -102,12 +101,7 @@ pub async fn create_did_configuration_resource(
let proof_value = secret_manager
.sign(
message.as_bytes(),
JwsAlgorithm::from_str(
serde_json::json!(crate::config::get_preferred_signing_algorithm())
.as_str()
.unwrap(),
)
.unwrap(),
from_jsonwebtoken_algorithm_to_jwsalgorithm(&crate::config::get_preferred_signing_algorithm()),
)
.await
.unwrap();
Expand Down

0 comments on commit 747bcf7

Please sign in to comment.