Skip to main content

Module authz

Module authz 

Source

Enums§

Action
The operation being authorized. Borrows so Custom carries a handler’s &str name without allocating; it’s Copy, and the lifetime elides to Action<'_> at every call site.

Traits§

Authorizer
A pluggable authorization policy. can is synchronous and called several times per request, so an implementation must not perform I/O here — a DB-backed one reads a pre-loaded in-memory cache.

Functions§

authorize
The one place the access decision is made, so the invariants live together:
authorizer
The registered authorizer, if any. None means the built-in role-list check is used.
set_authorizer
Register the global authorization policy. Set-once: a later call is ignored with a warning, matching set_storage.