The discovery flow is the entry point for initializing a connection to a chat server. It begins when the user enters a server URL and ends with a parsed DiscoveryPayload containing endpoint metadata required for login and messaging.
This process is handled by the DiscoveryManager, which delegates the actual HTTP request and JSON parsing to DiscoveryCore. The result is then emitted to QML or application logic via success or failure signals.
This flow ensures that the application can dynamically adapt to different server configurations without requiring hardcoded URLs.
discover(urlString)
discoverySuccess
with the payloaddiscoveryFailed
with an error message{ "server_name": "My Chat Server", "auth_endpoint": "https://example.com/auth", "token_endpoint": "https://example.com/token", "chat_endpoint": "wss://example.com/chat" }
See also DiscoveryManager, DiscoveryPayload, and authenticationflow.html.