1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-08-07 17:03:01 +03:00

Start recovery view

This commit is contained in:
Quentin Gliech
2024-06-21 15:11:01 +02:00
parent 43582e7eca
commit 319c43abc5
10 changed files with 317 additions and 6 deletions

View File

@@ -776,6 +776,38 @@ impl SimpleRoute for OAuth2DeviceAuthorizationEndpoint {
const PATH: &'static str = "/oauth2/device";
}
/// `GET|POST /recover`
#[derive(Default, Serialize, Deserialize, Debug, Clone)]
pub struct AccountRecoveryStart;
impl SimpleRoute for AccountRecoveryStart {
const PATH: &'static str = "/recover";
}
/// `GET|POST /recover/progress/:session_id`
#[derive(Default, Serialize, Deserialize, Debug, Clone)]
pub struct AccountRecoveryProgress {
session_id: Ulid,
}
impl AccountRecoveryProgress {
#[must_use]
pub fn new(session_id: Ulid) -> Self {
Self { session_id }
}
}
impl Route for AccountRecoveryProgress {
type Query = ();
fn route() -> &'static str {
"/recover/progress/:session_id"
}
fn path(&self) -> std::borrow::Cow<'static, str> {
format!("/recover/progress/{}", self.session_id).into()
}
}
/// `GET /assets`
pub struct StaticAsset {
path: String,