client-api: Post PR login / UIAA fallback cleanup

This commit is contained in:
Jonas Platte 2021-05-21 18:08:38 +02:00
parent 4bfd60ffdd
commit 59b6b83773
No known key found for this signature in database
GPG Key ID: CC154DE0E30B7C67
5 changed files with 12 additions and 6 deletions

View File

@ -1,8 +1,8 @@
//! Endpoints for user session management.
pub mod fallback;
pub mod get_login_types;
pub mod login;
pub mod login_fallback;
pub mod logout;
pub mod logout_all;
pub mod sso_login;

View File

@ -17,7 +17,7 @@ use serde_json::{
use crate::error::{Error as MatrixError, ErrorBody};
pub mod fallback;
pub mod authorize_fallback;
/// Additional authentication information for the user-interactive authentication API.
#[derive(Clone, Debug, Outgoing, Serialize)]

View File

@ -6,7 +6,7 @@ ruma_api! {
metadata: {
description: "Get UIAA fallback web page.",
method: GET,
name: "uiaa_fallback",
name: "authorize_fallback",
path: "/_matrix/client/r0/auth/:auth_type/fallback/web",
rate_limited: false,
authentication: None,
@ -44,8 +44,13 @@ impl Request {
}
impl Response {
/// Creates a new `Response` with the given redirect URL and HTML body.
pub fn new(redirect_url: Option<String>, body: Vec<u8>) -> Self {
Self { redirect_url, body }
/// Creates a new `Response` with the given HTML body.
pub fn new(body: Vec<u8>) -> Self {
Self { redirect_url: None, body }
}
/// Creates a new `Response` with the given redirect URL and an empty body.
pub fn redirect(url: String) -> Self {
Self { redirect_url: Some(url), body: Vec::new() }
}
}

View File

@ -0,0 +1 @@
fn main() {}