blob: 1cc8ca208f77ca81f8959bb9d517ba35d550dbf7 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
using LibMatrix.Homeservers.ImplementationDetails.Synapse;
using LibMatrix.Responses;
using LibMatrix.Services;
namespace LibMatrix.Homeservers;
public class AuthenticatedHomeserverHSE : AuthenticatedHomeserverGeneric {
public AuthenticatedHomeserverHSE(string serverName, HomeserverResolverService.WellKnownUris wellKnownUris, string? proxy, string accessToken) : base(serverName,
wellKnownUris, proxy, accessToken) { }
public Task<Dictionary<string, LoginResponse>> GetExternalProfilesAsync() =>
ClientHttpClient.GetFromJsonAsync<Dictionary<string, LoginResponse>>("/_hse/client/v1/external_profiles");
public Task SetExternalProfile(string sessionName, LoginResponse session) =>
ClientHttpClient.PutAsJsonAsync($"/_hse/client/v1/external_profiles/{sessionName}", session);
}
|