[httpd] Refactor httpd.c

- move stuff around and clean up
- put oauth out in own module like the other modules
This commit is contained in:
ejurgensen
2017-11-05 19:34:50 +01:00
parent 709d99d4c4
commit 9ed810d9df
6 changed files with 686 additions and 502 deletions

View File

@@ -91,6 +91,18 @@ httpd_send_reply(struct evhttp_request *req, int code, const char *reason, struc
void
httpd_send_error(struct evhttp_request *req, int error, const char *reason);
/*
* Redirects to /admin.html
*/
void
httpd_redirect_to_admin(struct evhttp_request *req);
/*
* Redirects to [uri]/index.html
*/
void
httpd_redirect_to_index(struct evhttp_request *req, const char *uri);
int
httpd_basic_auth(struct evhttp_request *req, const char *user, const char *passwd, const char *realm);