ascii-chat
Binary v0.15.83-53-gb711d8720
Library lib/v0.3.2-701-gb711d8720
Video chat in your terminal
Loading...
Searching...
No Matches
basic_auth.h
Go to the documentation of this file.
1#pragma once
2
4#include <stdbool.h>
5
7struct http_response;
8
9#define HTTP_BASIC_AUTH_VALUE_CAPACITY 1024
10
11typedef struct http_basic_auth_config {
12 bool enabled;
13 const char *username;
14 const char *password;
15 const char *realm;
17
22
23asciichat_error_t http_basic_auth_parse(const char *authorization,
26 const char *username,
27 const char *password);
29 const char *authorization);
31 const struct http_request_info *request,
32 struct http_response *response);
Synchronized per-thread pending error stacks and value snapshots. SET_ERRNO pushes,...
void http_basic_credentials_clear(http_basic_credentials_t *credentials)
Definition basic_auth.c:9
struct http_basic_auth_config http_basic_auth_config_t
bool http_server_authorize(const http_basic_auth_config_t *config, const struct http_request_info *request, struct http_response *response)
Definition basic_auth.c:119
bool http_basic_auth_authorize(const http_basic_auth_config_t *config, const char *authorization)
Definition basic_auth.c:101
#define HTTP_BASIC_AUTH_VALUE_CAPACITY
Definition basic_auth.h:9
bool http_basic_auth_matches(const http_basic_credentials_t *provided, const char *username, const char *password)
Definition basic_auth.c:64
struct http_basic_credentials http_basic_credentials_t
asciichat_error_t http_basic_auth_parse(const char *authorization, http_basic_credentials_t *out)
Definition basic_auth.c:14
asciichat_error_t
Error and exit codes - unified status values (0-255).
Definition error_codes.h:44
static bool size_t gotel_query_t * out
Definition queries.h:8
const char * password
Definition basic_auth.h:14
const char * username
Definition basic_auth.h:13