From 440807e02393410327cd86d5ffa007dee98f8954 Mon Sep 17 00:00:00 2001 From: Rory& Date: Fri, 19 Apr 2024 15:54:30 +0200 Subject: Partial User-Interactive Authentication, allow skipping homeserver typing --- LibMatrix/Homeservers/RemoteHomeServer.cs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'LibMatrix/Homeservers/RemoteHomeServer.cs') diff --git a/LibMatrix/Homeservers/RemoteHomeServer.cs b/LibMatrix/Homeservers/RemoteHomeServer.cs index e6d58b1..c29137c 100644 --- a/LibMatrix/Homeservers/RemoteHomeServer.cs +++ b/LibMatrix/Homeservers/RemoteHomeServer.cs @@ -1,5 +1,6 @@ using System.Net.Http.Json; using System.Text.Json; +using System.Text.Json.Nodes; using System.Text.Json.Serialization; using System.Web; using ArcaneLibs.Extensions; @@ -24,6 +25,7 @@ public class RemoteHomeserver { if (proxy is not null) ClientHttpClient.DefaultRequestHeaders.Add("MXAE_UPSTREAM", baseUrl); if (!string.IsNullOrWhiteSpace(wellKnownUris.Server)) FederationClient = new FederationClient(WellKnownUris.Server!, proxy); + Auth = new(this); } private Dictionary _profileCache { get; set; } = new(); @@ -106,6 +108,8 @@ public class RemoteHomeserver { if (mxcUri.StartsWith("https://")) return mxcUri; return $"{ClientHttpClient.BaseAddress}/_matrix/media/v3/download/{mxcUri.Replace("mxc://", "")}".Replace("//_matrix", "/_matrix"); } + + public UserInteractiveAuthClient Auth; } public class AliasResult { -- cgit 1.4.1