-/*TODO: Remove and replace with the actual actuator code*/
-static void ActuatorHandler(FCGIContext *context, char *params) {
- const char *key, *value, *loginkey = NULL;
- while ((params = FCGI_KeyPair(params, &key, &value))) {
- if (!strcmp(key, "key")) {
- loginkey = value;
- }
- }
- if (!loginkey || !FCGI_Authorized(context, loginkey)) {
- FCGI_BeginJSON(context, STATUS_UNAUTHORIZED);
- FCGI_JSONPair("description", "Invalid key specified.");
- FCGI_EndJSON();
- } else {
- FCGI_BeginJSON(context, STATUS_OK);
- FCGI_JSONPair("description", "Logged in!");
- FCGI_EndJSON();
- }
+/**
+ * Revokes the current authorization key, if present.
+ * @param context The context to work in
+ */
+void FCGI_AuthorizeEnd(FCGIContext *context) {
+ *(context->login_key) = 0;
+ FCGI_BeginJSON(context, STATUS_OK);
+ FCGI_EndJSON();
+ return;