Parrhesia.Policy.ConnectionPolicy (parrhesia v0.12.0)

Copy Markdown

Connection/session-level policy checks shared by websocket and management entrypoints.

Summary

Functions

authorize_authenticated_pubkey(pubkey)

@spec authorize_authenticated_pubkey(String.t()) ::
  :ok | {:error, :pubkey_not_allowed}

authorize_authenticated_pubkeys(authenticated_pubkeys)

@spec authorize_authenticated_pubkeys(MapSet.t(String.t())) ::
  :ok | {:error, :auth_required | :pubkey_not_allowed}

authorize_remote_ip(remote_ip)

@spec authorize_remote_ip(tuple() | String.t() | nil) :: :ok | {:error, :ip_blocked}