# `AshVault.Macaroon.CheckContext`
[🔗](https://github.com/jakeschurch/ash_vault/blob/main/lib/ash_vault/macaroon/definition.ex#L139)

What a caveat check is handed alongside the caveat's value.

  * `:phase` — `:verify` (inside the verifying read, after the record is loaded) or
    `:authorize` (inside `AshVault.Checks.MacaroonAllows`)
  * `:now` — the verifier's clock (`AshVault.Macaroon.Clock`), never caller-supplied
  * `:resource`, `:macaroon`, `:scope`, `:tenant`, `:actor`
  * `:record` — the record the token names (`:verify`), or the actor (`:authorize`)
  * `:action` — the action being authorized (`:authorize` only)
  * `:subject` — the query, changeset or action input being authorized (`:authorize`
    only)
  * `:context` — the Ash context of the verifying read or authorized action. It is
    request-supplied: a check may use it as the *request* a caveat restricts (an IP, a
    path), never as a source of trust.

# `t`

```elixir
@type t() :: %AshVault.Macaroon.CheckContext{
  action: term(),
  actor: term(),
  context: term(),
  macaroon: term(),
  now: term(),
  phase: term(),
  record: term(),
  resource: term(),
  scope: term(),
  subject: term(),
  tenant: term()
}
```

---

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