Skip to content

Commit

Permalink
api_server: add attestation_service to auth callback
Browse files Browse the repository at this point in the history
Signed-off-by: Mikko Ylinen <[email protected]>
  • Loading branch information
mythi committed Sep 20, 2023
1 parent e4a7b81 commit 76a5e7d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/api/src/http/attest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ pub(crate) async fn auth(
request: web::Json<Request>,
map: web::Data<SessionMap<'_>>,
timeout: web::Data<i64>,
_attestation_service: web::Data<AttestationService>,
) -> Result<HttpResponse> {
info!("request: {:?}", &request);

Expand Down
3 changes: 2 additions & 1 deletion src/api/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,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"))
Expand Down

0 comments on commit 76a5e7d

Please sign in to comment.