Add SSO login endpoint
This commit is contained in:
parent
19bf8dbd77
commit
8fb01a193e
@ -9,6 +9,7 @@ Improvements:
|
|||||||
* Add media endpoints: `r0::media::{get_media_config, get_media_preview, get_content_as_filename}`
|
* Add media endpoints: `r0::media::{get_media_config, get_media_preview, get_content_as_filename}`
|
||||||
* Add `unstable_features` to `unversioned::get_supported_versions` (introduced in r0.5.0)
|
* Add `unstable_features` to `unversioned::get_supported_versions` (introduced in r0.5.0)
|
||||||
* Add request and response parameters for `r0::account::deactivate`
|
* Add request and response parameters for `r0::account::deactivate`
|
||||||
|
* Add `r0::session::sso_login` (introduced in r0.5.0)
|
||||||
|
|
||||||
Breaking changes:
|
Breaking changes:
|
||||||
|
|
||||||
|
@ -4,3 +4,4 @@ pub mod get_login_types;
|
|||||||
pub mod login;
|
pub mod login;
|
||||||
pub mod logout;
|
pub mod logout;
|
||||||
pub mod logout_all;
|
pub mod logout_all;
|
||||||
|
pub mod sso_login;
|
||||||
|
28
src/r0/session/sso_login.rs
Normal file
28
src/r0/session/sso_login.rs
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
//! [GET /_matrix/client/r0/login/sso/redirect](https://matrix.org/docs/spec/client_server/r0.6.0#get-matrix-client-r0-login-sso-redirect)
|
||||||
|
|
||||||
|
use ruma_api::ruma_api;
|
||||||
|
|
||||||
|
ruma_api! {
|
||||||
|
metadata {
|
||||||
|
description: "",
|
||||||
|
method: GET,
|
||||||
|
name: "sso_login",
|
||||||
|
path: "/_matrix/client/r0/login/sso/redirect",
|
||||||
|
rate_limited: false,
|
||||||
|
requires_authentication: false,
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
request {
|
||||||
|
/// URL to which the homeserver should return the user after completing
|
||||||
|
/// authentication with the SSO identity provider.
|
||||||
|
#[ruma_api(query)]
|
||||||
|
pub redirect_url: String,
|
||||||
|
}
|
||||||
|
|
||||||
|
response {
|
||||||
|
/// Redirect URL to the SSO identity provider.
|
||||||
|
#[ruma_api(header = LOCATION)]
|
||||||
|
pub location: String,
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user