slcl/auth.h

17 lines
486 B
C
Raw Permalink Normal View History

2023-01-09 01:22:54 +01:00
#ifndef AUTH_H
#define AUTH_H
2023-10-10 23:43:47 +02:00
#include <libweb/http.h>
#include <stdbool.h>
2023-01-09 01:22:54 +01:00
struct auth *auth_alloc(const char *dir);
void auth_free(struct auth *a);
int auth_cookie(const struct auth *a, const struct http_cookie *c);
int auth_login(const struct auth *a, const char *user, const char *password,
char **cookie);
const char *auth_dir(const struct auth *a);
int auth_quota(const struct auth *a, const char *user, bool *available,
unsigned long long *quota);
2023-01-09 01:22:54 +01:00
#endif /* AUTH_H */