diff --git a/Cargo.lock b/Cargo.lock index 1c5c3b340a..bc8f361243 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2307,12 +2307,6 @@ dependencies = [ "synstructure", ] -[[package]] -name = "fast_qr" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcb3b08010bdea9b4ab23deabd626509ee241a793b7da9148d9101c677adcf4d" - [[package]] name = "fastrand" version = "1.9.0" @@ -3437,7 +3431,6 @@ dependencies = [ "diddoc_legacy", "dotenvy", "env_logger 0.10.0", - "fast_qr", "futures", "log", "messages", diff --git a/aries/agents/mediator/Cargo.toml b/aries/agents/mediator/Cargo.toml index 618fde8118..ab41220a70 100644 --- a/aries/agents/mediator/Cargo.toml +++ b/aries/agents/mediator/Cargo.toml @@ -24,7 +24,6 @@ axum-macros = "0.3.8" diddoc_legacy = { path = "../../misc/legacy/diddoc_legacy" } dotenvy = "0.15" env_logger = "0.10.0" -fast_qr = { version = "0.10.2", features = ["svg"] } futures = "0.3.28" log = "0.4.20" messages = { path = "../../messages" } diff --git a/aries/agents/mediator/src/http_routes/mod.rs b/aries/agents/mediator/src/http_routes/mod.rs index 30289dbeea..29d748fba7 100644 --- a/aries/agents/mediator/src/http_routes/mod.rs +++ b/aries/agents/mediator/src/http_routes/mod.rs @@ -18,32 +18,6 @@ use crate::{ persistence::MediatorPersistence, }; -pub async fn oob_invite_qr( - headers: HeaderMap, - State(agent): State>, -) -> Response { - let Json(oob_json) = oob_invite_json(State(agent)).await; - match detect_mime_type(&headers) { - "application/json" => Json(oob_json).into_response(), - _ => { - let oob_string = serde_json::to_string_pretty(&oob_json).unwrap(); - let qr = fast_qr::QRBuilder::new(oob_string.clone()).build().unwrap(); - let oob_qr_svg = fast_qr::convert::svg::SvgBuilder::default().to_str(&qr); - Html(format!( - " - {oob_qr_svg}
-
{oob_string}
" - )) - .into_response() - } - } -} - fn detect_mime_type(headers: &HeaderMap) -> &str { headers .get(ACCEPT) @@ -89,8 +63,7 @@ pub async fn build_router( ) -> Router { Router::default() .route("/", get(readme)) - .route("/register", get(oob_invite_qr)) - .route("/register.json", get(oob_invite_json)) + .route("/invitation", get(oob_invite_json)) .route("/didcomm", get(handle_didcomm).post(handle_didcomm)) .layer(tower_http::catch_panic::CatchPanicLayer::new()) .with_state(Arc::new(agent))