Evaluates one ability and rejects when it is denied.
The deny rejection carries an HTTP status hint (401 for an anonymous
principal, 403 otherwise), so an application's error handler answers it
with the same body the authorization guards write.
Resolves when allowed
Registers a policy. Refused once the application has started.
The definition to register
Reports a registered ability without evaluating anything.
The policy name
The ability name
The ability's description, or undefined when either is unknown
The authorization policy service — one evaluator behind every entry point (route guard, decorator, imperative check), so they cannot disagree.
The evaluation semantics are fixed rather than configurable:
401) unless the ability opted in;beforeruns first:trueallows,undefinedfalls through, anything else denies;true;beforeor the check DENIES, and is reported to the logger — it never answers200.Example
Since
0.9.0