Skip to main content

Module auth

Module auth 

Source
Expand description

Matrix Authorization Rules (Spec §10.4)

Implements iterative auth-checking of events against the room state at their prev_events — never the current time. This is the core security invariant that prevents retroactive authorization tampering.

Enums§

AuthError
An error indicating why an event failed authorization.

Functions§

check_auth
Check whether event is authorized given the room state at its prev_events.
check_auth_chain
Iteratively apply auth checks to a list of events in topological order. Returns the list of events that passed auth checks, and the list that failed with their respective errors.

Type Aliases§

RoomState
The room state at a specific point in the DAG (keyed by (type, state_key) -> event).