# `AshHooks.Provider.Mock`
[🔗](https://github.com/baselabs/ash_hooks/blob/v3.3.0/lib/ash_hooks/provider/mock.ex#L1)

Reference provider for tests and examples: HMAC-SHA256 over the raw body via
the default implementation, event type from `payload["type"]`, and an
echoing typed event.

`parse_event_type/1` resolves the type string with `String.to_existing_atom/1`.
It fails closed: a type that was not already an atom is reported as an unknown
event, never converted into a newly created one (no atom-table growth from
webhook input). The Mock imposes NO taxonomy beyond that: any pre-existing
atom is accepted as a type (it is a general test double; real providers
match their vendor's known type strings). JSON scalar values (`nil`, `true`,
`false`, decoded from JSON null/true/false and from their string forms) are
rejected as malformed, not event types.

The optional secret callbacks are deliberately NOT implemented: the Mock
exercises the app-level default scope, with the secret supplied by the
consumer's DSL `secret` source.

# `handle_event`

Builds the reference provider's typed event from a verified payload.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
