mas_handlers/compat/
mod.rs1use axum::{Json, response::IntoResponse};
8use hyper::StatusCode;
9use serde::Serialize;
10
11pub(crate) mod login;
12pub(crate) mod login_sso_complete;
13pub(crate) mod login_sso_redirect;
14pub(crate) mod logout;
15pub(crate) mod refresh;
16
17#[derive(Debug, Serialize)]
18struct MatrixError {
19 errcode: &'static str,
20 error: &'static str,
21 #[serde(skip)]
22 status: StatusCode,
23}
24
25impl IntoResponse for MatrixError {
26 fn into_response(self) -> axum::response::Response {
27 (self.status, Json(self)).into_response()
28 }
29}