# `AshAuthentication.Strategy.KubernetesServiceAccount.VerdictCache`
[🔗](https://git.jakeschurch.com/jake/ash_authentication_kubernetes/src/tag/v0.1.0/lib/ash_authentication/strategy/kubernetes_service_account/verdict_cache.ex#L1)

Per-node cache of verification verdicts (and JWKS key sets), owned by this
library's application. Keys are SHA-256 of the token, never the token.

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `flush`

```elixir
@spec flush() :: :ok
```

Drops everything cached (tests, and after changing verifiers).

# `verify`

```elixir
@spec verify(AshAuthentication.Strategy.KubernetesServiceAccount.t(), String.t()) ::
  {:ok, map()}
  | {:error,
     :unauthenticated
     | AshAuthentication.Strategy.KubernetesServiceAccount.UnavailableError.t()}
```

Verifies `token` for `strategy`, from the cache while a verdict lives.
In the last 5000ms of a verdict one caller re-verifies (single
flight); an outage then keeps the cached verdict until it expires, a refusal
drops it.

---

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