LiveKit.Grants.Agent (LiveKit v0.1.0)

Copy Markdown View Source

Cloud agent permissions, encoded as the agent claim of a LiveKit JWT.

iex> LiveKit.Grants.to_claims(%LiveKit.Grants.Agent{admin: true})
%{"admin" => true}

admin allows creating, updating and deleting cloud agents; simulation_admin allows managing simulations and scenarios.

Summary

Functions

Mapping from struct field to LiveKit JWT claim key.

Types

t()

@type t() :: %LiveKit.Grants.Agent{
  admin: boolean() | nil,
  simulation_admin: boolean() | nil
}

Functions

claim_keys()

@spec claim_keys() :: %{required(atom()) => String.t()}

Mapping from struct field to LiveKit JWT claim key.

Examples

iex> LiveKit.Grants.Agent.claim_keys()[:simulation_admin]
"simulationAdmin"