Move the auth handler out of JS. #7

This commit is contained in:
2024-03-31 16:15:50 -04:00
parent 9ce30dee70
commit b04eccdbda
11 changed files with 872 additions and 242 deletions

View File

@ -196,6 +196,15 @@ void tf_http_request_unref(tf_http_request_t* request);
*/
const char* tf_http_request_get_header(tf_http_request_t* request, const char* name);
/**
** Get a cookie value from request headers.
** @param cookie_header The value of the "Cookie" header of the form
** "name1=value1; name2=value2".
** @param name The cookie name.
** @return The cookie value, if found, or NULL. Must be freed with tf_free().
*/
const char* tf_http_get_cookie(const char* cookie_header, const char* name);
/**
** Send a websocket message.
** @param request The HTTP request which was previously updated to a websocket