feat(lander): re-add authentication using LNM
All checks were successful
ci/woodpecker/push/build Pipeline was successful

This commit is contained in:
Jef Roosens 2023-12-06 18:16:52 +01:00
parent 8dc8ef8e2d
commit 1a7686003c
Signed by: Jef Roosens
GPG key ID: B75D4F293C7052DB
4 changed files with 41 additions and 6 deletions

View file

@ -83,6 +83,8 @@ lnm_err lnm_http_loop_route_add(lnm_http_loop *hl, lnm_http_route *route);
lnm_err lnm_http_loop_run(lnm_http_loop *hl, uint16_t port);
void lnm_http_loop_set_api_key(lnm_http_loop *hl, const char *api_key);
/**
* Represents what state an HTTP loop request is currently in.
*/
@ -115,6 +117,7 @@ typedef struct lnm_http_loop_gctx {
lnm_http_ctx_init_fn ctx_init;
lnm_http_ctx_reset_fn ctx_reset;
lnm_http_ctx_free_fn ctx_free;
const char *api_key;
void *c;
} lnm_http_loop_gctx;
@ -130,4 +133,6 @@ typedef struct lnm_http_loop_ctx {
lnm_http_step_err lnm_http_loop_step_body_to_buf(lnm_http_conn *conn);
lnm_http_step_err lnm_http_loop_step_auth(lnm_http_conn *conn);
#endif