ExIcaoVds.Signer behaviour
(ex_icao_vds v0.3.2)
Copy Markdown
Behaviour for signing backends.
Implement this to support local keys, Vault Transit, PKCS#11, or any custom signing service. The signer receives the raw bytes to sign and must not modify them (hashing is the signer's responsibility).
Summary
Callbacks
Return the algorithm atom for this signer config.
Return the key reference string.
Return public metadata (safe to log) about this signer.
Sign payload bytes using the given signer_config.
Return the signer identifier string.
Callbacks
Return the algorithm atom for this signer config.
Return the key reference string.
Return public metadata (safe to log) about this signer.
@callback sign(payload :: binary(), signer_config :: map(), opts :: keyword()) :: {:ok, ExIcaoVds.Signature.t()} | {:error, ExIcaoVds.Error.t()}
Sign payload bytes using the given signer_config.
Return the signer identifier string.