# `Issho.Identity`
[🔗](https://github.com/hattoriai/issho/blob/v0.1.0/lib/issho/identity.ex#L1)

An actor as a room knows it: its key, what others see of it, and on
whose behalf it acts.

Issho builds one from an `Issho.Actor` when an actor joins (`new/2`),
signs it into the join token, and gives it to your policy's
`c:Issho.Policy.authorize/3`. `claims` is a small map of your own that
travels with it (a tenant's id, a plan), so that a policy can answer
without reading your database on every message.

# `kind`

```elixir
@type kind() :: :human | :agent | :service
```

# `t`

```elixir
@type t() :: %Issho.Identity{
  avatar: String.t() | nil,
  claims: map(),
  color: String.t() | nil,
  key: String.t(),
  kind: kind(),
  name: String.t() | nil,
  on_behalf_of: t() | nil
}
```

# `new`

```elixir
@spec new(Issho.Actor.t() | t(), keyword()) :: t()
```

The identity of an actor. Options: `:on_behalf_of`, another actor (an
agent acting for a person), and `:claims`.

# `public`

```elixir
@spec public(t()) :: map()
```

The identity as the other people of a room receive it: string keys, no
claims, and the palette index of an actor with no colour of its own.

---

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