Add identity endpoint

This commit is contained in:
Jon Staab
2026-03-26 16:10:24 -07:00
parent 9da5e027a7
commit a2f9ca9688
9 changed files with 129 additions and 38 deletions
+8
View File
@@ -40,6 +40,14 @@ Notes:
- Return `data` is a single plan struct matching `id`
- If plan does not exist, return `404` with `code=not-found`
--- Identity routes
## `async fn get_identity(...) -> Response`
- Serves `GET /identity`
- Authorizes anyone, but must be authorized
- Return `data` is an `Identity` struct
--- Tenant routes
## `async fn list_tenants(...) -> Response`
+8
View File
@@ -3,6 +3,14 @@ This file describes the domain model. This description should be translated into
- Fields marked as private should use `#[serde(skip_serializing)]` in their definition.
- Fields marked as readonly should use `#[serde(skip_deserializing)]` in their definition.
# Identity
Identity is a description of a user.
- `pubkey` - the user's nostr pubkey
- `is_admin` - whether the user is an admin
- `is_tenant` - whether the user has an account
# Activity
Activity is an audit log of all actions performed by a user or a worker process. This allows us to trace history to create invoices, synchronize actions to external services, and debug system behavior.