AshAuthzed.Adapters.SpiceDBHttp (ash_authzed v0.2.0)

Copy Markdown View Source

Adapter for communicating with an external SpiceDB / Authzed server over HTTP/JSON via Req.

Options

  • :url - Base URL of the SpiceDB HTTP server. Defaults to "http://localhost:8443".
  • :token - Preshared key / Bearer token for SpiceDB authentication. Defaults to "secret".
  • :req_options - Additional options forwarded directly to Req.post/2 (such as :plug for testing).

Summary

Functions

Converts a Zanzibar relationship tuple string into a SpiceDB JSON relationship map.

Functions

parse_tuple_to_json(tuple_str)

@spec parse_tuple_to_json(String.t()) :: {:ok, map()} | {:error, AshAuthzed.Error.t()}

Converts a Zanzibar relationship tuple string into a SpiceDB JSON relationship map.