opsick
|
Opsick server endpoints. More...
#include "http.h"
Go to the source code of this file.
Functions | |
void | opsick_endpoints_init () |
void | opsick_endpoints_free () |
void | opsick_get_home (http_s *request) |
void | opsick_get_pubkey (http_s *request) |
void | opsick_post_users_does_id_exist (http_s *request) |
void | opsick_post_users_create (http_s *request) |
void | opsick_post_users_body (http_s *request) |
void | opsick_post_users_passwd (http_s *request) |
void | opsick_post_users_2fa (http_s *request) |
void | opsick_post_users_delete (http_s *request) |
void | opsick_post_users_extend (http_s *request) |
void | opsick_post_users (http_s *request) |
void | opsick_post_users_keys (http_s *request) |
void | opsick_post_users_keys_update (http_s *request) |
void | opsick_get_version (http_s *request) |
Opsick server endpoints.
void opsick_endpoints_free | ( | ) |
Free opsick keys and turn off keygen.
void opsick_endpoints_init | ( | ) |
Initializes all opsick endpoints.
void opsick_get_home | ( | http_s * | request | ) |
GET request to home (path "/").
request | The HTTP request. |
void opsick_get_pubkey | ( | http_s * | request | ) |
GET request to "/pubkey".
Gets the server's public key and returns it in the HTTP response body.
request | The HTTP request. |
void opsick_get_version | ( | http_s * | request | ) |
GET request to "/version".
Gets the server's version number and schema version number and returns it in the HTTP response body.
request | The HTTP request. |
void opsick_post_users | ( | http_s * | request | ) |
POST request to "/users".
Gets a user's metadata from the server db.
This is POST because the request requires a body, but technically it's a "get" operation.
request | The HTTP request. |
void opsick_post_users_2fa | ( | http_s * | request | ) |
POST request to "/users/2fa".
request | The HTTP request. |
void opsick_post_users_body | ( | http_s * | request | ) |
POST request to "/users/body".
request | The HTTP request. |
void opsick_post_users_create | ( | http_s * | request | ) |
POST request to "/users/create".
Requires API Key
Creates a new user on the opsick server. The user ID + other parameters should be passed in the request body.
request | The HTTP request. |
void opsick_post_users_delete | ( | http_s * | request | ) |
POST request to "/users/delete".
Deletes a user from the opsick server (irreversibly!). The user ID + other parameters should be passed in the request body.
request | The HTTP request. |
void opsick_post_users_does_id_exist | ( | http_s * | request | ) |
POST request to "/users/check"
request | The HTTP request. |
void opsick_post_users_extend | ( | http_s * | request | ) |
POST request to "/users/extend".
Requires API Key
Extends a user account on the opsick server. This request needs to be signed by the API master with the API key. The user ID + other parameters should be passed in the request body.
request | The HTTP request. |
void opsick_post_users_keys | ( | http_s * | request | ) |
POST request to "/users/keys".
Gets a user's encrypted private keys from the server db.
This is POST because the request requires a body, but technically it's a "get" operation.
request | The HTTP request. |
void opsick_post_users_keys_update | ( | http_s * | request | ) |
POST request to "/users/keys/update".
Submits a new set of fresh user keypairs to the opsick server (clients are allowed to regenerate their keys at will).
This is POST because the request requires a body, but technically it's a "get" operation.
request | The HTTP request. |
void opsick_post_users_passwd | ( | http_s * | request | ) |
POST request to "/users/passwd".
User password change request, containing the old pw, the new pw as well as a TOTP (if 2FA is enabled).
request | The HTTP request. |