# `ExScim.Authorization.Adapter`
[🔗](https://github.com/ExScim/ex_scim/blob/main/lib/ex_scim/authorization/adapter.ex#L1)

Implements an authorization policy and decides whether an authenticated
`ExScim.Scope` may perform an action on a resource.

# `action`

```elixir
@type action() :: :read | :create | :update | :delete
```

# `denial`

```elixir
@type denial() :: {:missing_scopes, [String.t()]} | term()
```

Indicate missing scopes or other reason for denying access.

# `resource`

```elixir
@type resource() ::
  :users | :groups | :me | :schemas | :resource_types | :service_provider_config
```

# `authorize`

```elixir
@callback authorize(scope :: ExScim.Scope.t(), resource(), action()) ::
  :ok | {:error, denial()}
```

Returns `:ok` when `scope` may perform `action` on `resource`, `{:error, denial}` otherwise.

---

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