Selecto.Capabilities.Request (Selecto v0.4.6)

Copy Markdown

Stable capability question shape.

A request describes who is asking, which domain capability is being checked, what operation is being attempted, and any target/context data needed by a host policy resolver.

Summary

Functions

Builds a request from atom-keyed or string-keyed map/keyword attributes.

Types

t()

@type t() :: %Selecto.Capabilities.Request{
  actor: term(),
  capability: atom() | String.t(),
  context: map(),
  domain: term(),
  metadata: map(),
  operation: atom() | String.t(),
  target: map(),
  tenant: term()
}

Functions

new(attrs)

@spec new(map() | keyword()) :: t()

Builds a request from atom-keyed or string-keyed map/keyword attributes.