Authenticated boundary that creates a Spectre.GAM.SubmissionContext.
A Domain is wired to exactly one ingress module. ref/0 must return that
adapter's stable, non-secret identity; every context and observed Evidence
produced by the adapter carries the same reference. Candidate payloads and
ordinary call options are intentionally absent from authentication. They
cannot select the authenticated principal or replace the Domain's adapter.
use Spectre.GAM.Ingress, ref: "ingress:my-app:v1" declares the behaviour and
an overridable ref/0. The reference is explicit and stays stable across
module renames. Implement authenticate/5 and observe/4 yourself; no
authentication, observation or permissive defaults are generated.
This contract describes the mediated same-BEAM boundary. It does not turn a shared VM into a sandbox; stronger deployments isolate the ingress and make its authentication mechanism independently verifiable.
Summary
Callbacks
Returns this adapter's stable identity within SubmissionContext records.
Functions
Builds observed Evidence with every trusted ingress binding forced by the context.
Types
Callbacks
@callback authenticate(String.t(), String.t(), term(), non_neg_integer(), keyword()) :: {:ok, Spectre.GAM.SubmissionContext.t()} | {:error, term()}
@callback observe(Spectre.GAM.SubmissionContext.t(), term(), integer(), keyword()) :: {:ok, Spectre.GAM.Evidence.t() | [Spectre.GAM.Evidence.t()]} | {:error, term()}
@callback ref() :: String.t()
Returns this adapter's stable identity within SubmissionContext records.
Functions
@spec evidence(Spectre.GAM.SubmissionContext.t(), integer(), map() | keyword()) :: {:ok, Spectre.GAM.Evidence.t()} | {:error, term()}
Builds observed Evidence with every trusted ingress binding forced by the context.