# `Arc.Identity.Provider`
[🔗](https://github.com/Cratis/Arc.Elixir/blob/main/lib/arc/identity.ex#L90)

Supplies the application-specific details of the signed-in user.

`details/1` runs on every identity request, with a fresh `Arc.Identity.Context`. Cache expensive
lookups inside it. It may return:

  * `{:ok, details}` - the user may enter; `details` is a map or an `Arc.Schema` struct
  * `{:unauthorized, details}` - the user is authenticated but may not use the application (403)
  * an `Arc.Identity.Details` struct, equivalent to the above

Use `use Arc.Identity.Provider, details: MyApp.Details` to declare the details type; Arc
discovers the provider from its application modules. At most one provider may exist per
application, or name one explicitly with the `identity_details:` option.

# `details`

```elixir
@callback details(Arc.Identity.Context.t()) ::
  {:ok, term()} | {:unauthorized, term()} | Arc.Identity.Details.t()
```

---

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