mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-13 12:16:54 +00:00
chore(deps): Update ruma digest to 83d80c8
Co-authored-by: Ginger <ginger@gingershaped.computer>
This commit is contained in:
1 parent
4201f44445
commit
746a2686e3
7 files changed
+147
-52
No files matched your search
@@ -6,7 +6,10 @@ use axum::{
|
||||
extract::{FromRequest, Path, Query},
|
||||
};
|
||||
use conduwuit::{Error, Result, err};
|
||||
use ruma::{CanonicalJsonObject, api::IncomingRequest};
|
||||
use ruma::{
|
||||
CanonicalJsonObject,
|
||||
api::{IncomingRequest, IncomingRequestExt},
|
||||
};
|
||||
use serde::Deserialize;
|
||||
|
||||
use crate::{State, router::auth::CheckAuth};
|
||||
@@ -82,18 +85,18 @@ where
|
||||
|
||||
// Extract the query parameters and path
|
||||
let Path(path): Path<Vec<String>> = parts.extract().await?;
|
||||
let borrowed_path: Vec<_> = path.iter().map(String::as_str).collect();
|
||||
let Query(auth_query): Query<AuthQueryParams> = parts.extract().await?;
|
||||
|
||||
// Assemble a new request from the read body and parts
|
||||
let request = hyper::Request::from_parts(parts, body);
|
||||
let request = hyper::Request::from_parts(parts, body.as_ref());
|
||||
|
||||
// Check authentication
|
||||
let auth =
|
||||
R::Authentication::authenticate::<R, bytes::Bytes>(services, &request, auth_query)
|
||||
.await?;
|
||||
R::Authentication::authenticate::<R, &[u8]>(services, &request, auth_query).await?;
|
||||
|
||||
// Deserialize the body
|
||||
let body = R::try_from_http_request(request, &path)
|
||||
let body = R::try_from_http_request(request, &borrowed_path)
|
||||
.map_err(|e| err!(Request(BadJson(debug_warn!("{e}")))))?;
|
||||
|
||||
Ok(Self { body, json_body, identity: auth })
|
||||
|
||||
@@ -3,7 +3,7 @@ use bytes::BytesMut;
|
||||
use conduwuit::{Error, error};
|
||||
use http::StatusCode;
|
||||
use http_body_util::Full;
|
||||
use ruma::api::{OutgoingResponse, client::uiaa::UiaaResponse};
|
||||
use ruma::api::{OutgoingResponse, OutgoingResponseExt, client::uiaa::UiaaResponse};
|
||||
|
||||
pub(crate) struct RumaResponse<T>(pub(crate) T)
|
||||
where
|
||||
|
||||
@@ -8,7 +8,7 @@ use conduwuit::{Result, utils::timepoint_from_now};
|
||||
use ruma::{
|
||||
MilliSecondsSinceUnixEpoch,
|
||||
api::{
|
||||
OutgoingResponse,
|
||||
OutgoingResponseExt,
|
||||
federation::discovery::{OldVerifyKey, ServerSigningKeys, get_server_keys},
|
||||
},
|
||||
assign,
|
||||
|
||||
Reference in new issue
Block a user