Expand description
RedseatClient: authenticated requests to one server, with the server token
refreshed before it expires. Port of @redseat/api client.ts.
Structs§
- Authorized
Url - A server URL with the token that opens it, for code that fetches the file itself
(a video player, a browser). Send the token in a header with
Self::authorization, or in the URL withSelf::with_token_querywhen the fetcher cannot set headers. The token expires atSelf::expires: ask for a new URL before then. - Client
Options - How to build a
RedseatClient. - Cloud
Token Source - Server tokens from the cloud, for a signed-in user.
- Event
Options - Options of
RedseatClient::subscribe_events. - Redseat
Client - Client of one Redseat server. Cheap to clone; clones share the token.
Constants§
- DEFAULT_
REFRESH_ THRESHOLD - Default margin before expiry at which the server token is refreshed (5 minutes).
Traits§
- Server
Token Source - Gives fresh tokens for a server.
CloudTokenSourceasks the cloud.
Type Aliases§
- Server
Event Stream - Typed server events. Each item is an event, or an error for an event that could not be read (the stream goes on) or for a broken connection (the stream ends).