Can start Matrix authentication from UI
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user