Add SSO login endpoint

This commit is contained in:
iinuwa 2020-02-26 08:11:32 -06:00 committed by GitHub
parent 19bf8dbd77
commit 8fb01a193e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 31 additions and 1 deletions

View File

@ -9,6 +9,7 @@ Improvements:
* 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 request and response parameters for `r0::account::deactivate`
* Add `r0::session::sso_login` (introduced in r0.5.0)
Breaking changes:

View File

@ -4,3 +4,4 @@ pub mod get_login_types;
pub mod login;
pub mod logout;
pub mod logout_all;
pub mod sso_login;

View 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,
}
}