From 184f9415b6d871454376359ab4cb826ca472a323 Mon Sep 17 00:00:00 2001 From: Mikko Ylinen Date: Wed, 29 May 2024 13:18:10 +0300 Subject: [PATCH] kbs: api_server: add attestation_service to auth callback Signed-off-by: Mikko Ylinen --- kbs/src/api/src/http/attest.rs | 1 + kbs/src/api/src/lib.rs | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/kbs/src/api/src/http/attest.rs b/kbs/src/api/src/http/attest.rs index 320123ce8..5971bc459 100644 --- a/kbs/src/api/src/http/attest.rs +++ b/kbs/src/api/src/http/attest.rs @@ -17,6 +17,7 @@ pub(crate) async fn auth( request: web::Json, map: web::Data, timeout: web::Data, + _attestation_service: web::Data>, ) -> Result { info!("Auth API called."); debug!("Auth Request: {:?}", &request); diff --git a/kbs/src/api/src/lib.rs b/kbs/src/api/src/lib.rs index 1e8866c7f..5daae181d 100644 --- a/kbs/src/api/src/lib.rs +++ b/kbs/src/api/src/lib.rs @@ -290,7 +290,8 @@ impl ApiServer { cfg_if::cfg_if! { if #[cfg(feature = "as")] { server_app = server_app.app_data(web::Data::clone(&sessions)) - .app_data(web::Data::clone(&attestation_service)).service(web::resource(kbs_path!("auth")).route(web::post().to(http::auth))) + .app_data(web::Data::clone(&attestation_service)) + .service(web::resource(kbs_path!("auth")).route(web::post().to(http::auth))) .service(web::resource(kbs_path!("attest")).route(web::post().to(http::attest))) .service( web::resource(kbs_path!("attestation-policy"))