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

Add password change discovery

See https://web.dev/change-password-url/
This commit is contained in:
Quentin Gliech
2022-05-12 15:06:37 +02:00
parent a6f931840c
commit bf1d96fc23
5 changed files with 21 additions and 4 deletions

View File

@ -23,6 +23,7 @@ pub enum PostAuthAction {
#[serde(deserialize_with = "serde_with::rust::display_fromstr::deserialize")]
data: i64,
},
ChangePassword,
}
impl PostAuthAction {
@ -35,6 +36,7 @@ impl PostAuthAction {
pub fn go_next(&self) -> axum::response::Redirect {
match self {
Self::ContinueAuthorizationGrant { data } => ContinueAuthorizationGrant(*data).go(),
Self::ChangePassword => AccountPassword.go(),
}
}
}
@ -55,6 +57,13 @@ impl SimpleRoute for Webfinger {
const PATH: &'static str = "/.well-known/webfinger";
}
/// `GET /.well-known/change-password`
pub struct ChangePasswordDiscovery;
impl SimpleRoute for ChangePasswordDiscovery {
const PATH: &'static str = "/.well-known/change-password";
}
/// `GET /oauth2/keys.json`
#[derive(Debug, Clone)]
pub struct OAuth2Keys;