Static ReadonlyCOOKIEStatic ReadonlyTICKET_StaticaddAdds a session to a set. A remembered entry for the same account is replaced by it; a set at its cap first drops the account that signed out longest ago, and refuses only when every place is a session.
the set, edited in place
the session
{ sub, username, displayName }
{ ok, dropped }, or { ok: false, full: true }
StaticbyA set by its id, with no cookie check: for a session's own set when it ends, which knows the id and has no browser in front of it.
the set's id
the row (a copy), or null
StaticcookieThe Set-Cookie line for a set's cookie value; an empty value clears it.
<setId>.<handle>, or '' to clear
the header line
StaticcookieThe cookie that names the ambient realm's account set.
sts_accounts, or sts_accounts_<realm> outside the default
StaticenabledWhether several signed-in accounts are on in the ambient realm.
authn.multipleAccounts
StaticendTakes a session out of a set, remembering its account as signed out.
the set, edited in place
the session
Optionalat: number
when it ended, epoch ms; now by default
the account it remembered, or null when the sid was not there
StaticforgetForgets a remembered account. A live one is not touched.
the set, edited in place
the account's key
true when it was forgotten
StaticfreshA new, empty set, not yet saved.
the row
StatichasWhether a set has room for one more session without refusing: a free place, or a remembered account to drop.
the set
how many of its sessions are live
true when a sign-in may add one
StatickeepHow long after its last write a set can still matter (#820 part 2): a signed-out account's remembering, and twice the session lifetime for a session listed in it. A hot path (every row a flush writes): no Entering/Leaving pair.
milliseconds
StatickeyThe key an account goes by in the picker and the API: its subject, or its name where it has none. Never a sid.
{ sub, username }
the key
StaticmaxThe most accounts a set holds, live and remembered together.
authn.maxBrowserAccounts
StaticmergeMerges two nodes' copies of one account set.
this process's copy
the stored copy
the merged row
StaticmintMints a single-use ticket that resumes one flow as one session.
the browser's set
the chosen session
the path (no query) the ticket may be spent on
the pending sign-in it was chosen in, for the record
the ticket
StaticpruneBrings a row up to date: every session isLive says has ended moves to
remembered, and every remembered account older than
authn.rememberedAccountDays is dropped.
the set, edited in place
sid → whether its session is live
OptionalnowMs: number
now
{ ended, expired }, the counts
StaticrememberHow long a signed-out account is remembered, in milliseconds.
authn.rememberedAccountDays in milliseconds
StaticremoveDeletes a row (an empty set, at the expiry job).
the set's id
StaticrotateGives a row a fresh handle and answers the cookie value. The caller saves the row and writes the cookie.
the set
<setId>.<handle>
StaticsaveWrites a row back to the store.
the set
StaticsetThe set a request's cookie names, if the cookie carries its current handle.
the request's cookies, name → value
the row (a copy), or null
StaticsizeHow many places a row holds: its sessions and its remembered accounts.
the set
the count
StaticspendSpends a ticket: it is deleted whatever it held, and its row is answered only while it has not expired.
the ticket
{ setId, sid, path, pendingId, username }, or null
StaticstripTakes the ticket parameter off a request's address — url,
originalUrl and the parsed query — so no protocol module ever sees
it, and answers its value.
the request
the ticket, or '' where it carried none
StaticsweepThe body of authn.account-set-expiry for the ambient realm: every set
pruned, and every set left with nothing in it deleted.
sid → whether its session is live
{ sets, ended, expired, deleted }
StaticsweepSweeps for at most SWEEP_RUN_BUDGET_MS from where the last run stopped, yielding between slices (#784). The scheduler job's body.
says whether a set should keep listing a session
OptionalbudgetMs: number
the run's budget; SWEEP_RUN_BUDGET_MS when absent
a promise of the run's counts, with at and of for the pass
StaticsweepSweeps as sweep() does, yielding the event loop between slices of
SWEEP_SLICE_MS (#780). The scheduler job's body.
says whether a set should keep listing a session
a promise of { sets, ended, expired, deleted }
StaticwithAn address with a ticket added to its query.
the address, a path on this service
the ticket
the address with sts_account= on it
StaticwriteAppends a set's cookie to a response, beside any cookie already on it.
the response
the cookie value, or '' to clear it
whether it was written
A browser's account set: the stores, the cookie and the operations on a row. A static utility class.