From 01b751afc30fcca02ef01cf96e9eddf591b2d36d Mon Sep 17 00:00:00 2001 From: Bas van den Aakster Date: Fri, 12 Dec 2025 17:44:35 +0100 Subject: [PATCH] docs: Fix DELETE endpoint auth and anonymous users description - DELETE /services/:fqn uses request body for auth, not query parameters - Updated anonymous users description to reflect server capabilities (not client auto-claiming behavior which was removed) --- README.md | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 866e5aa..1389a5e 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Scalable WebRTC signaling server with cryptographic username claiming, service p ## Features - **Username Claiming**: Cryptographic username ownership with Ed25519 signatures (365-day validity, auto-renewed on use) -- **Anonymous Users**: Auto-generated anonymous usernames for quick testing without claiming +- **Anonymous Users**: Support for `anon-*` usernames for quick testing - **Service Publishing**: Service:version@username naming (e.g., `chat:1.0.0@alice`) - **Service Discovery**: Random and paginated discovery for finding services without knowing usernames - **Semantic Versioning**: Compatible version matching (chat:1.0.0 matches any 1.x.x) @@ -250,10 +250,14 @@ Returns array of unique available offers from different users. #### `DELETE /services/:fqn` Unpublish a service (requires username, signature, and ownership) -**Query Parameters:** -- `username` - Your username -- `signature` - Base64-encoded Ed25519 signature -- `message` - Signed message (format: `deleteService:{username}:{serviceFqn}:{timestamp}`) +**Request:** +```json +{ + "username": "alice", + "signature": "base64-encoded-signature", + "message": "deleteService:alice:chat:1.0.0@alice:1733404800000" +} +``` **Response:** ```json @@ -491,8 +495,8 @@ All authenticated requests require: ### Anonymous Users - **Format**: `anon-{timestamp}-{random}` (e.g., `anon-lx2w34-a3f501`) -- **Generation**: Auto-generated by client for testing -- **Behavior**: Same as regular usernames, can be claimed +- **Generation**: Can be generated by client for testing +- **Behavior**: Same as regular usernames, must be explicitly claimed like any username ### Service Publishing - **Ownership Verification**: Every publish requires username signature