Parrhesia.API.RequestContext (parrhesia v0.12.0)

Copy Markdown

Shared request context used across API and policy surfaces.

This struct carries caller identity and transport metadata through authorization and storage boundaries.

The most important field for external callers is authenticated_pubkeys. For example:

Summary

Functions

Merges arbitrary metadata into the context.

Types

t()

@type t() :: %Parrhesia.API.RequestContext{
  actor: term(),
  authenticated_pubkeys: MapSet.t(String.t()),
  caller: atom(),
  metadata: map(),
  peer_id: String.t() | nil,
  remote_ip: String.t() | nil,
  subscription_id: String.t() | nil,
  transport_identity: map() | nil
}

Functions

put_metadata(context, metadata)

@spec put_metadata(t(), map()) :: t()

Merges arbitrary metadata into the context.

Existing keys are overwritten by the incoming map.