feat: add auth step
This commit is contained in:
parent
16103f9b24
commit
1e42dc04dc
4 changed files with 27 additions and 1 deletions
|
|
@ -30,6 +30,7 @@ typedef struct http_loop_gctx {
|
|||
http_route *routes;
|
||||
size_t route_count;
|
||||
Trie *trie;
|
||||
const char *api_key;
|
||||
} http_loop_gctx;
|
||||
|
||||
/*
|
||||
|
|
@ -110,6 +111,11 @@ void http_loop_res_add_header(http_loop_ctx *ctx, http_header type,
|
|||
*/
|
||||
bool http_loop_step_body_to_buf(event_loop_conn *conn);
|
||||
|
||||
/*
|
||||
* Authenticate the request using the X-Api-Key header
|
||||
*/
|
||||
bool http_loop_step_auth(event_loop_conn *conn);
|
||||
|
||||
/**
|
||||
* Initialize a new http loop
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue