Skip to main contentModule args
Source use std::any::TypeId; ๐ use std::fmt::Debug; ๐ use std::fmt::Debug; ๐ use std::net::IpAddr; ๐ use std::ops::Deref; ๐ use axum::body::Body; ๐ use axum::extract::FromRequest; ๐ use axum_extra::extract::cookie::CookieJar; ๐ use bytes::BufMut; ๐ use bytes::Bytes; ๐ use bytes::BytesMut; ๐ use http::Method; ๐ use http::Request as HttpRequest; ๐ use ruma::CanonicalJsonObject; ๐ use ruma::CanonicalJsonValue; ๐ use ruma::DeviceId; ๐ use ruma::OwnedDeviceId; ๐ use ruma::OwnedServerName; ๐ use ruma::OwnedUserId; ๐ use ruma::ServerName; ๐ use ruma::UserId; ๐ use ruma::api::IncomingRequest; ๐ use ruma::api::client::appservice::fed_proxy::unstable::Request as FedProxyRequest; ๐ use ruma::api::client::media::create_content::v3::Request as UploadRequest; ๐ use ruma::api::client::media::create_content_async::v3::Request as AsyncUploadRequest; ๐ use ruma::api::client::membership::is_joined::unstable::Request as IsJoinedRequest; ๐ use ruma::api::error::DeserializationError; ๐ use ruma::api::error::FromHttpRequestError; ๐ use serde_json::Value as JsonValue; ๐ use serde_json::from_slice; ๐ use tuwunel_core::Err; ๐ use tuwunel_core::Error; ๐ use tuwunel_core::Result; ๐ use tuwunel_core::err; ๐ use tuwunel_core::implement; ๐ use tuwunel_core::utils::string::EMPTY; ๐ use tuwunel_service::Services; ๐ use tuwunel_service::appservice::RegistrationInfo; ๐ use super::auth::Auth; ๐ use super::auth::AuthDispatch; ๐ use super::auth::Scheme; ๐ use super::auth::admin::require_admin; ๐ use super::auth::auth; ๐ use super::client_ip::rate_limit_ip; ๐ use super::request::Request; ๐ use super::request::from as request_from; ๐ use crate::State; ๐
- Args
- Extracts a typed Ruma request and its authentication context.
- authenticate ๐
- Authenticates a request while retaining the headers consumed by extraction.
- is_missing_field ๐
- Reports whether a body failed to parse on an absent required field.
- make_args ๐
- Builds typed arguments after authentication and any UIA body merge.
- names_param_errors ๐
- Identifies the routes whose MSC names the errcodes for unparsable input.
- parse_error ๐
- Maps a request that failed to parse to its error.
- parse_json ๐
- Parses canonical JSON while retaining ordinary JSON for typed deserialization.
- record_auth_context ๐
- restore_body ๐
- Restores omitted fields from a UIA session before typed body parsing.
- serialize_body ๐
- Serializes a canonical body directly into the HTTP byte buffer.
- takes_raw_body ๐
- Identifies the routes whose request body is an uploaded file, not JSON.
- ArgsAdmin
- Requires administrator authorization before returning request body errors.