about summary refs log tree commit diff
path: root/LibMatrix/Homeservers/AuthenticatedHomeserverGeneric.cs
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2024-05-16 11:46:45 +0200
committerRory& <root@rory.gay>2024-05-16 11:46:45 +0200
commite1f99073f3d9788a4b48d2bb7091e3894dcefa1a (patch)
tree63eaa6ead968ca0fd3f2a85a2b6ae13bab900156 /LibMatrix/Homeservers/AuthenticatedHomeserverGeneric.cs
parentAdd valid room memberhip values as constants (diff)
downloadLibMatrix-e1f99073f3d9788a4b48d2bb7091e3894dcefa1a.tar.xz
Dont use refs for proxy
Diffstat (limited to 'LibMatrix/Homeservers/AuthenticatedHomeserverGeneric.cs')
-rw-r--r--LibMatrix/Homeservers/AuthenticatedHomeserverGeneric.cs5
1 files changed, 3 insertions, 2 deletions
diff --git a/LibMatrix/Homeservers/AuthenticatedHomeserverGeneric.cs b/LibMatrix/Homeservers/AuthenticatedHomeserverGeneric.cs
index 5520d3a..c729a44 100644
--- a/LibMatrix/Homeservers/AuthenticatedHomeserverGeneric.cs
+++ b/LibMatrix/Homeservers/AuthenticatedHomeserverGeneric.cs
@@ -19,8 +19,8 @@ using Microsoft.Extensions.Logging.Abstractions;
 namespace LibMatrix.Homeservers;
 
 public class AuthenticatedHomeserverGeneric : RemoteHomeserver {
-    public AuthenticatedHomeserverGeneric(string serverName, HomeserverResolverService.WellKnownUris wellKnownUris, ref string? proxy, string accessToken) : base(serverName,
-        wellKnownUris, ref proxy) {
+    public AuthenticatedHomeserverGeneric(string serverName, HomeserverResolverService.WellKnownUris wellKnownUris, string? proxy, string accessToken) : base(serverName,
+        wellKnownUris, proxy) {
         AccessToken = accessToken;
         ClientHttpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", accessToken);
 
@@ -42,6 +42,7 @@ public class AuthenticatedHomeserverGeneric : RemoteHomeserver {
     public string UserLocalpart => UserId.Split(":")[0][1..];
     public string ServerName => UserId.Split(":", 2)[1];
 
+    [JsonIgnore]
     public string AccessToken { get; set; }
 
     public HsNamedCaches NamedCaches { get; set; } = null!;