nobotgate/nobotgate.h
2026-09-08 18:36:12 +02:00

19 lines
460 B
C

#ifndef NOBOTGATE
#define NOBOTGATE
#include <libowfat/buffer.h>
#include <libowfat/stralloc.h>
/* buffer shall stream an http request.
* it stores the found bearer token to result or
* returns 0 if none is found.
* always succeeds. */
int parse_token(buffer *b, stralloc *result);
/* return: 1 if the token is valid(i.e. in tokenfile),
* 0 else */
int check_token(char *tokenfile, stralloc *token);
int send_headers(buffer *from, buffer *to);
#endif