mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-17 07:41:23 +01:00
Update style edition to 2024
This commit is contained in:
parent
6e0152d4e5
commit
a4355fe8aa
121 changed files with 367 additions and 335 deletions
|
|
@ -1,34 +1,33 @@
|
|||
use std::{collections::BTreeMap, iter::FromIterator, str};
|
||||
|
||||
use axum::{
|
||||
async_trait,
|
||||
RequestExt, RequestPartsExt, async_trait,
|
||||
body::Body,
|
||||
extract::{FromRequest, Path},
|
||||
response::{IntoResponse, Response},
|
||||
RequestExt, RequestPartsExt,
|
||||
};
|
||||
use axum_extra::{
|
||||
headers::{authorization::Bearer, Authorization},
|
||||
typed_header::TypedHeaderRejectionReason,
|
||||
TypedHeader,
|
||||
headers::{Authorization, authorization::Bearer},
|
||||
typed_header::TypedHeaderRejectionReason,
|
||||
};
|
||||
use bytes::{BufMut, Bytes, BytesMut};
|
||||
use http::{Request, StatusCode};
|
||||
use http_body_util::BodyExt;
|
||||
use ruma::{
|
||||
api::{
|
||||
client::error::ErrorKind, AuthScheme, IncomingRequest, Metadata,
|
||||
OutgoingResponse,
|
||||
},
|
||||
server_util::authorization::XMatrix,
|
||||
CanonicalJsonValue, MilliSecondsSinceUnixEpoch, OwnedDeviceId,
|
||||
OwnedServerName, OwnedUserId, UserId,
|
||||
api::{
|
||||
AuthScheme, IncomingRequest, Metadata, OutgoingResponse,
|
||||
client::error::ErrorKind,
|
||||
},
|
||||
server_util::authorization::XMatrix,
|
||||
};
|
||||
use serde::Deserialize;
|
||||
use tracing::{error, warn};
|
||||
|
||||
use super::{Ar, Ra};
|
||||
use crate::{service::appservice::RegistrationInfo, services, Error, Result};
|
||||
use crate::{Error, Result, service::appservice::RegistrationInfo, services};
|
||||
|
||||
enum Token {
|
||||
Appservice(Box<RegistrationInfo>),
|
||||
|
|
@ -122,7 +121,7 @@ async fn ar_from_request_inner(
|
|||
soft_logout: false,
|
||||
},
|
||||
"Unknown access token.",
|
||||
))
|
||||
));
|
||||
}
|
||||
(AuthScheme::AccessToken, Token::Appservice(info)) => {
|
||||
let user_id = query_params
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue