defmodule Parc do @moduledoc """ Generic PARC (Principal, Action, Resource, Context) authorization contract, independent of any policy framework. The contract and engine: - `Parc.Request`: the authorization request a decision is made on. - `Parc.RequestPreparer`: the behaviour for a pipeline step that prepares the request (enrich, telemetry, validate, trace) before the decision. - `Parc.PolicyDecider`: the behaviour for the single decision point that turns a request into an allow/deny/challenge/error verdict. - `Parc.Pipeline`: runs the declared request preparers, then the decider; also the `use Parc.Pipeline` builder for declaring a pipeline (`prepare`/`decide`). A host adapter builds a `Parc.Request` from its own action representation and runs it through the pipeline, mapping the verdict back to the host policy framework. Nothing here depends on the adapter or that framework. A decider or preparer is written against `Parc.*` alone. """ end