OptionalaccessOptionalallowAllow non-TLS SSF URLs other than loopback. Default false.
OptionalaudienceExpected SET aud. Defaults to the aud in the stream configuration.
OptionalauthorizationAlternative to accessToken: returns the Authorization (and DPoP) headers for one request, e.g.
(r) => oidcClient.resourceHeaders(tokenSet, r) for a DPoP-bound token.
OptionalclockDefault 60.
OptionaldeleteDelete the stream, best effort, when the page is unloaded for good
(pagehide that is not entering the back/forward cache). Default false: a stream kept across
visits holds the events that arrive while no tab is open, which start({ catchUp: true })
delivers, and a browser may drop a request sent while a page unloads. Leave it off and let the
transmitter time an abandoned stream out (iya-sts: ssf.personStreamInactivityTimeoutS).
OptionaldescriptionOptionaleventsDefault: all CAEP event types.
OptionalfetchOptionalinit: RequestInitOptionalhandlersOptionalhttpOptionaljtiReplay-protection window size. Default 10000.
OptionalmaxHow many times a SET whose handlers throw is left for the
transmitter to send again before it is acknowledged anyway (onError gets handler_failed).
Default 5. A SET that can't be checked for a reason that may pass (a network error, a signing
key not yet in the JWKS) is never reported as an error: it is left for redelivery until it can.
OptionalmaxMax SETs per poll. Default 25.
OptionalmaxReject SETs whose iat is older than this (seconds). Default 0: no limit.
A polled SET waits at the transmitter until it is read, so an age limit would throw away the
signals a stopped receiver catches up on. A replay is caught by its jti whatever its age.
OptionalonYour logic for every accepted event: called
once per event, before the typed handlers, and awaited. Default logEventReceived, which
prints the event to the console. null turns it off. A throw goes to onError with
phase: 'hook', and the typed handlers still run.
OptionalpageWhere pagehide
is listened for. Default globalThis (the window).
OptionalpollDefault 5000.
OptionalrequireRequire the typ: secevent+jwt header (SSF §4.1.9). Default true.
OptionalstreamUse an existing stream instead of creating one.
SSF transmitter issuer; metadata is loaded from its /.well-known/ssf-configuration.
Delivery is RFC 8936 POLL: a browser cannot receive a push. (SETs obtained any other way can still be
handed to receiveSet().)
OptionaltrustedOrigins besides the transmitter's issuer and configuration_endpoint that the stream's poll endpoint_url may be at. The poll request carries the person's access token, so it is refused anywhere else.
Bearer token for the transmitter's management and poll endpoints.