Optionalopts: AccountManagerOptions = {}This tab's active account (whatever its status).
The accounts a security event's subject (sub_id) is about. A subject naming a session (iya-sts:
gnap-grant:<id> or gnap-token:<jti>) matches only the account holding that grant or token.
Makes a listed account this tab's active account; the previous one becomes dormant. Nothing is sent to
the AS unless the account's token is due for rotation. When the rotation or onActivate fails, the
previously active account is reactivated and the error thrown.
Starts a grant for another person, added as a further account.
Optionalopts: {Cancels rotation timers and stops listening to other tabs (call on shutdown).
Ends an account's session in this browser because the AS or a security event says its grant has
ended: onLeave runs, its grant is removed from the cache (not revoked: the AS already knows), and it
stays listed as ended with the reason. Does nothing for an account that is not signed in.
Optionalreason: stringRemoves an account that is not signed in from the list.
The active account's grant, its token rotated first when (nearly) expired.
Optionalopts: { forceRefresh?: boolean }Completes a grant from the finish redirect. The person it is about is added to the cache (or, when already listed, signed in again) and becomes this tab's active account.
An error is thrown with err.context ({ intent, key? }) and, for reauth, err.account.
The identity subjectMatches() compares a security event's subject with: iss, sub, the grant's
session ids as sid, and a verified email or phone number.
Loads the shared account list and reactivates the account this tab had active. A failed reactivation leaves the tab with no active account and is emitted as "activation_error".
Every account in this browser, in the order added.
Starts a grant for this account's person again: the request names them in user (RFC 9635 section
2.4), and a grant approved by anybody else is refused at the callback (account_mismatch).
Optionalopts: {Rotates the active account's access token now.
Starts a grant the AS decides on. Resolves { url } to send the browser to; or, when the AS issued
the grant with nobody asked, the signed-in account ({ account, grantSet, intent, added }).
Optionalopts: {Signs one account out of this browser: onLeave runs, its grant is revoked at the AS (with revoke,
the default) and removed from the cache, and it stays listed as signed-out. GNAP has no front-channel
logout: revoking the grant is what ends it, and iya-sts then sends CAEP session-revoked for it.
Optionalkey: string = ...
Default: the active account.
Optionalopts: { revoke?: boolean } = {}Signs every account out of this browser, revoking each grant.
Optionalopts: { revoke?: boolean } = {}
Every person signed in through one GNAP client in this browser, with ONE active account per tab.
getTokenSet()), and only its token is rotated in the background. The others are dormant.activate(key)rotates a dormant account's token if due and runsonActivatebefore it becomes active.Signing in:
signIn()/addAccount()start a grant the AS decides on (its account picker when several people are signed in there).reauthenticate(key)names the person in the request'suserand refuses a grant approved by anybody else.signOut(key)revokes that account's grant at the AS.Events: "added" (account), "updated" (account), "activated" (account|undefined, previous|undefined), "rotated" (account) for the active account, "signed-out" (account), "ended" (account, reason), "forgotten" (account), "activation_error" (account, error), and "change" after any of them, including changes made in another tab.