Raised by verify_mac! when a tag does not verify.
The key version was found, the scope is not destroyed and the provider answered: the tag is simply not the tag for this data, under this context (scope, resource, field) and this key version. Causes are a forged or tampered tag, tampered data, a tag replayed from another scope, resource or field, or a tag paired with the wrong key version.
It is deliberately distinct from the three answers that are not "the tag is wrong":
AshVault.Errors.KeyDestroyed— the scope was crypto-erased; every tag it issued is revoked, permanentlyAshVault.Errors.KeyNotFound— the claimed key version does not existAshVault.Errors.ProviderUnavailable— the provider could not answer; retry
The struct carries neither the tag nor the data. A tag is a bearer credential, and Ash logs and reports errors verbatim.
Summary
Functions
Create an Elixir.AshVault.Errors.InvalidMac without raising it.
Functions
@spec exception(opts :: Keyword.t()) :: %AshVault.Errors.InvalidMac{ __exception__: true, bread_crumbs: term(), class: term(), field: term(), key_version: term(), path: term(), resource: term(), splode: term(), stacktrace: term(), vars: term() }
Create an Elixir.AshVault.Errors.InvalidMac without raising it.
Keys
- :resource
- :field
- :key_version