#ifndef AUTH_MASTER_H
#define AUTH_MASTER_H
#include "net.h"
enum auth_master_flags {
/* Enable logging debug information */
/* Don't disconnect from auth socket when idling */
};
struct auth_user_info {
const char *service;
bool debug;
};
struct auth_user_reply {
};
struct auth_master_connection *
/* Returns the auth_socket_path */
/* Do a USER lookup. Returns -2 = user-specific error, -1 = internal error,
0 = user not found, 1 = ok. When returning -1 and fields[0] isn't NULL, it
contains an error message that should be shown to user. */
const char *const **fields_r);
/* Do a PASS lookup (the actual password isn't returned). */
/* Flush authentication cache for everyone (users=NULL) or only for specified
users. Returns number of users flushed from cache. */
/* Parse userdb extra fields into auth_user_reply structure. */
struct auth_user_reply *reply_r);
/* Iterate through all users. If user_mask is non-NULL, it contains a string
with wildcards ('*', '?') that the auth server MAY use to limit what users
are returned (but it may as well return all users anyway). */
struct auth_master_user_list_ctx *
const char *user_mask,
/* Returns -1 if anything failed, 0 if ok */
#endif