auth/account_actions.ts

Account RPC action handlers — self-service operations for the authenticated account.

Seven request_response actions bound to handlers:

- Session reads: account_verify, account_session_list. - Session mutations: account_session_revoke, account_session_revoke_all. - API token management: account_token_create, account_token_list, account_token_revoke.

The action specs themselves live in auth/account_action_specs.ts. Every spec declares auth: {account: 'required', actor: 'none'} so the dispatcher enforces account-grain auth before the handler runs. Revoke operations are account-scoped (via query_session_revoke_for_account / query_revoke_api_token_for_account) so passing another account's session or token id returns revoked: false rather than revealing whether the id exists.

Counterpart to auth/account_routes.ts, which keeps the cookie-lifecycle flows (login, logout, password, signup, bootstrap) on REST.

Declarations
#

2 declarations

view source

AccountActionOptions
#

create_account_actions
#

auth/account_actions.ts view source

(deps: Pick<RouteFactoryDeps, "log" | "audit">, options?: AccountActionOptions): RpcAction[]

Create the self-service account RPC actions.

deps

RouteFactoryDeps (log, audit, …). audit.emit writes audit rows via the captured pool; the bound emitter encapsulates on_audit_event fan-out and the optional AuditLogConfig.

type Pick<RouteFactoryDeps, "log" | "audit">

options

per-factory configuration

default {}

returns

RpcAction[]

the RpcAction array to spread into a create_rpc_endpoint call

Depends on
#

Imported by
#