mech.h revision 3685c7c8ca227960360c720b8bd515801a9e5ad6
#ifndef __MECH_H
#define __MECH_H
#include "network.h"
#include "auth-client-interface.h"
struct auth_client_connection;
const void *data,
struct auth_client_connection *conn);
struct auth_request {
int refcount;
char *user;
struct auth_client_connection *conn;
unsigned int id;
char *protocol;
struct auth_client_request_new *request,
const unsigned char *data,
/* ... mechanism specific data ... */
};
struct mech_module {
const char *mech_name;
unsigned int plaintext:1;
unsigned int advertise:1;
unsigned int passdb_need_plain:1;
unsigned int passdb_need_credentials:1;
struct auth_request *(*auth_new)(void);
};
struct mech_module_list {
struct mech_module_list *next;
struct mech_module module;
};
extern struct mech_module_list *mech_modules;
extern const char *const *auth_realms;
extern const char *default_realm;
extern const char *anonymous_username;
extern char username_chars[256];
extern int ssl_require_client_cert;
const string_t *auth_mechanisms_get_list(void);
struct auth_client_request_new *request,
const unsigned char *data,
struct auth_client_request_continue *request,
const unsigned char *data,
struct auth_request *auth_request,
int mech_is_valid_username(const char *username);
void mech_cyrus_sasl_init_lib(void);
struct auth_request *
struct auth_client_request_new *request,
const unsigned char *data,
const struct var_expand_table *
const char *(*escape_func)(const char *));
void auth_failure_buf_flush(void);
void mech_init(void);
void mech_deinit(void);
#endif