Add shared auth and identity APIs

This commit is contained in:
2026-03-16 21:07:26 +01:00
parent 987415d80c
commit 769177a63e
16 changed files with 590 additions and 27 deletions

View File

@@ -5,6 +5,10 @@ config :postgrex, :json_library, JSON
config :parrhesia,
moderation_cache_enabled: true,
relay_url: "ws://localhost:4413/relay",
identity: [
path: nil,
private_key: nil
],
limits: [
max_frame_bytes: 1_048_576,
max_event_bytes: 262_144,

View File

@@ -451,6 +451,10 @@ if config_env() == :prod do
config :parrhesia,
relay_url: string_env.("PARRHESIA_RELAY_URL", relay_url_default),
identity: [
path: string_env.("PARRHESIA_IDENTITY_PATH", nil),
private_key: string_env.("PARRHESIA_IDENTITY_PRIVATE_KEY", nil)
],
moderation_cache_enabled:
bool_env.("PARRHESIA_MODERATION_CACHE_ENABLED", moderation_cache_enabled_default),
enable_expiration_worker:

View File

@@ -15,6 +15,10 @@ config :parrhesia, Parrhesia.Web.Endpoint,
config :parrhesia,
enable_expiration_worker: false,
moderation_cache_enabled: false,
identity: [
path: Path.join(System.tmp_dir!(), "parrhesia_test_identity.json"),
private_key: nil
],
features: [verify_event_signatures: false]
pg_host = System.get_env("PGHOST")