# `Macaw.Auth.User`
[🔗](https://github.com/dcoai/macaw_auth/blob/v0.4.1/lib/macaw/auth/user.ex#L1)

The signed-in user, as every backend reports it.

- `id`: the backend's id, stable for the account's life.
- `username`: what the person signs in with.
- `display_name`: how the app shows them.
- `roles`: the roles the app's authorization reads, as strings. The
  library only checks membership (`Macaw.Auth.Plug.require_role/2`); what
  a role allows is the app's.
- `source`: where the identity came from (`"local"`, an LDAP source's
  name, an OAuth provider).
- `disabled`: a disabled user has no live session.
- `second_factor`: `:none`, `:enrolled`, or `:required` (policy demands
  one the user hasn't enrolled).
- `must_change_password`: the next step is a password change.
- `extra`: the backend's or app's own fields, untouched by the library.

# `t`

```elixir
@type t() :: %Macaw.Auth.User{
  disabled: boolean(),
  display_name: String.t() | nil,
  extra: map(),
  id: term(),
  must_change_password: boolean(),
  roles: [String.t()],
  second_factor: :none | :enrolled | :required,
  source: String.t() | nil,
  username: String.t()
}
```

---

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