NAME
Yote::YapiServer::Site - Root database object for Yote API server
DESCRIPTION
The root database object for the Yote API server framework. Handles:
- Application registration and initialization
- User account creation and management
- Session/token authentication
- Rate limiting coordination
INSTALLED APPS
Add applications to the %INSTALLED_APPS hash:
our %INSTALLED_APPS = (
example => 'Yote::YapiServer::App::Example',
myapp => 'MyApp::Handler',
);
METHODS
init()
Initializes the server, creating any apps that don't exist in the database.
get_app($app_name, $version)
Returns the app object for the given name. If $version is omitted, returns the latest (highest) version.
createUser(\%args, \%context)
Creates a new user account. Args: handle, email, password.
login(\%args, \%context)
Authenticates a user. Args: handle (or email), password. Returns token on success.
logout(\%args, \%context)
Ends the current session.
validateToken($token)
Validates a session token, returns session object or undef.