NAME
Yote::YapiServer::Handler - JSON API request handler
DESCRIPTION
Handles incoming JSON requests for the Spiderpup server. Provides:
- Request parsing and validation
- Token-based authentication
- Method dispatch with authorization
- Object capability enforcement
- Rate limiting
- Response serialization
REQUEST FORMAT
{
"action": "connect" | "call" | "login" | "createUser" | "logout",
"token": "session_token", // optional
"app": "appName", // for connect
"target": "appName" | "_obj_ID", // for call
"method": "methodName", // for call
"args": { ... } // method arguments (v/r/f prefixed)
}
RESPONSE FORMAT
{
"ok": 1,
"token": "session_token",
"resp": "<value>",
"classes": { "ClassName": ["method1", "method2"] },
"objects": { "_obj_42": { "_class": "ClassName", "data": { ... } } },
"apps": { "_app_example": ["hello", "getStats"] }
}
Error response:
{
"ok": 0,
"error": "error message"
}