Class RemoteServerKeys
Other servers' signing keys: fetched from each server's /_matrix/key/v2/server, else from the TrustedKeyServers, and kept in the database until their valid_until_ts, at most a week.
Inheritance
RemoteServerKeys
Assembly: Uniform.Matrix.Server.dll
public sealed class RemoteServerKeys
Constructors
|
Edit this page
View Source
RemoteServerKeys(FederationClient, ServerKeys, IDbContextFactory<ServerDbContext>, IOptionsMonitor<ServerOptions>, IOptionsMonitor<FederationOptions>, TimeProvider, ILogger<RemoteServerKeys>)
Declaration
public RemoteServerKeys(FederationClient federation, ServerKeys ownKeys, IDbContextFactory<ServerDbContext> contexts, IOptionsMonitor<ServerOptions> server, IOptionsMonitor<FederationOptions> options, TimeProvider time, ILogger<RemoteServerKeys> logger)
Parameters
Methods
|
Edit this page
View Source
Return the kept, validated key answer of serverName, fetching it when there is none or it expired; null when none can be had. Used to answer /_matrix/key/v2/query as a key server.
Declaration
public Task<JsonObject?> GetResponseAsync(string serverName, CancellationToken cancellationToken)
Parameters
Returns
|
Edit this page
View Source
Return the public key keyId of serverName, fetching the server's keys when not known or expired; null when the server does not have it or no answer can be had.
Declaration
public Task<string?> GetVerifyKeyAsync(string serverName, string keyId, CancellationToken cancellationToken)
Parameters
Returns
|
Edit this page
View Source
Fetch the keys of serverNames that are not kept or have expired, e.g. before checking the many events of a joined room: from the TrustedKeyServers in batches first, then from each remaining server, several at a time.
Declaration
public Task PrefetchAsync(IEnumerable<string> serverNames, CancellationToken cancellationToken)
Parameters
Returns