Keeps the instances an admin trusts or blocks for federated sign-in
(federation_peers). Users of a trusted instance sign in here directly,
those of a blocked one never do, and an instance on neither list is invite
only. federation-service.ts reads it at each sign-in, /manage edits it
through routes/federation.ts, and the login page offers the trusted ones.
Returns what an admin decided about the instance at issuer, or null when
it is on neither list.
Returns the instances on the lists, by name: every one for /manage, or
only the trusted ones, which the login page offers.
Takes the instance whose host is host off the lists, for /manage: its
users are invite only again, and those already here may sign in again if it
was blocked.
Puts the instance instance names, by its API's address or its pages'
(resolveIssuer), on the list of status, for /manage, and returns it. A trusted one must answer as a gerbeur instance, whose name
is kept; a blocked one is blocked whether it answers or not, keeping the
name it had. Blocking one ends the sessions of its users here at once:
their tokens stop counting by getSessionState, and this closes their
sockets.
Usage
import * as mod from "api/services/federation-peer-service.ts";