Provisional: added for Assert caller, and a change to it needs a changelog
line but no new major (docs/USER_PLUGINS_DESIGN.md).
The exchange's signed-in caller, as the application knows it, through
Alternera.Plugin.Host:
caller/3answers the claims of an assertion naming the caller foraudience, validlifetime_seconds(string keys;"sub"is the caller), or:anonymouswhen no one signed in. The host reads the exchange's sign-in from the context;sign/2signs those claims with the tenant's key:{:ok, token}, a JWT an upstream checks against the tenant's published key set, or{:error, message}.
A preview signs nothing: the plugin reads context.dry_run? and writes
what the header would hold instead.
Summary
Functions
The assertion's claims for the exchange's caller, or :anonymous.
Signs claims with the tenant's key.
Functions
@spec caller(map(), String.t(), pos_integer()) :: {:ok, map()} | :anonymous
The assertion's claims for the exchange's caller, or :anonymous.
Signs claims with the tenant's key.