Can start Matrix authentication from UI

This commit is contained in:
2025-11-05 18:27:41 +01:00
parent 3dab9f41d2
commit 37fad9ff55
12 changed files with 195 additions and 6 deletions

View File

@@ -2,7 +2,7 @@ use crate::app_config::AppConfig;
use crate::controllers::{HttpFailure, HttpResult};
use crate::extractors::auth_extractor::{AuthExtractor, AuthenticatedMethod};
use crate::extractors::session_extractor::MatrixGWSession;
use crate::users::{User, UserEmail};
use crate::users::{ExtendedUserInfo, User, UserEmail};
use actix_remote_ip::RemoteIP;
use actix_web::{HttpResponse, web};
use light_openid::primitives::OpenIDConfig;
@@ -108,7 +108,7 @@ pub async fn finish_oidc(
/// Get current user information
pub async fn auth_info(auth: AuthExtractor) -> HttpResult {
Ok(HttpResponse::Ok().json(auth.user))
Ok(HttpResponse::Ok().json(ExtendedUserInfo::from_user(auth.user).await?))
}
/// Sign out user