You've already forked authentication-service
mirror of
https://github.com/matrix-org/matrix-authentication-service.git
synced 2025-07-31 09:24:31 +03:00
Allow a trailing slash on the compat SSO route
This commit is contained in:
@ -329,6 +329,10 @@ where
|
|||||||
mas_router::CompatLoginSsoRedirectIdp::route(),
|
mas_router::CompatLoginSsoRedirectIdp::route(),
|
||||||
get(self::compat::login_sso_redirect::get),
|
get(self::compat::login_sso_redirect::get),
|
||||||
)
|
)
|
||||||
|
.route(
|
||||||
|
mas_router::CompatLoginSsoRedirectSlash::route(),
|
||||||
|
get(self::compat::login_sso_redirect::get),
|
||||||
|
)
|
||||||
.route(
|
.route(
|
||||||
mas_router::CompatLoginSsoComplete::route(),
|
mas_router::CompatLoginSsoComplete::route(),
|
||||||
get(self::compat::login_sso_complete::get).post(self::compat::login_sso_complete::post),
|
get(self::compat::login_sso_complete::get).post(self::compat::login_sso_complete::post),
|
||||||
|
@ -481,14 +481,24 @@ impl SimpleRoute for CompatRefresh {
|
|||||||
const PATH: &'static str = "/_matrix/client/:version/refresh";
|
const PATH: &'static str = "/_matrix/client/:version/refresh";
|
||||||
}
|
}
|
||||||
|
|
||||||
/// `POST /_matrix/client/v3/login/sso/redirect`
|
/// `GET /_matrix/client/v3/login/sso/redirect`
|
||||||
pub struct CompatLoginSsoRedirect;
|
pub struct CompatLoginSsoRedirect;
|
||||||
|
|
||||||
impl SimpleRoute for CompatLoginSsoRedirect {
|
impl SimpleRoute for CompatLoginSsoRedirect {
|
||||||
const PATH: &'static str = "/_matrix/client/:version/login/sso/redirect";
|
const PATH: &'static str = "/_matrix/client/:version/login/sso/redirect";
|
||||||
}
|
}
|
||||||
|
|
||||||
/// `POST /_matrix/client/v3/login/sso/redirect/:idp`
|
/// `GET /_matrix/client/v3/login/sso/redirect/`
|
||||||
|
///
|
||||||
|
/// This is a workaround for the fact some clients (Element iOS) sends a
|
||||||
|
/// trailing slash, even though it's not in the spec.
|
||||||
|
pub struct CompatLoginSsoRedirectSlash;
|
||||||
|
|
||||||
|
impl SimpleRoute for CompatLoginSsoRedirectSlash {
|
||||||
|
const PATH: &'static str = "/_matrix/client/:version/login/sso/redirect/";
|
||||||
|
}
|
||||||
|
|
||||||
|
/// `GET /_matrix/client/v3/login/sso/redirect/:idp`
|
||||||
pub struct CompatLoginSsoRedirectIdp;
|
pub struct CompatLoginSsoRedirectIdp;
|
||||||
|
|
||||||
impl SimpleRoute for CompatLoginSsoRedirectIdp {
|
impl SimpleRoute for CompatLoginSsoRedirectIdp {
|
||||||
|
Reference in New Issue
Block a user