mech.h revision 63f168d7a6f67842872ebef8d1d3aec3d6b23939
#ifndef __MECH_H
#define __MECH_H
#include "network.h"
#include "auth-client-interface.h"
enum auth_client_result {
};
struct auth_request;
struct auth_client_connection;
enum auth_client_result result,
struct auth_request {
int refcount;
char *user;
const char *extra_fields;
struct mech_module *mech;
struct auth_client_connection *conn;
unsigned int id;
const char *service;
unsigned int accept_input:1;
unsigned int no_failure_delay:1;
unsigned int no_login:1;
unsigned int proxy:1;
unsigned int destroyed:1;
/* ... mechanism specific data ... */
};
struct mech_module {
const char *mech_name;
enum mech_security_flags flags;
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 buffer_t *mech_handshake;
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_request_extra *
const char *cache_key);
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