auth-interface.h revision 6abc464b8f5aac60ea635769e4bc0a64c0fb43c5
#ifndef __AUTH_INTERFACE_H
#define __AUTH_INTERFACE_H
#define AUTH_COOKIE_SIZE 16
#define AUTH_MAX_REQUEST_DATA_SIZE 4096
#define AUTH_MAX_REPLY_DATA_SIZE 4096
#define AUTH_MAX_USER_LEN 64
#define AUTH_MAX_VUSER_LEN 256
#define AUTH_MAX_HOME_LEN 256
#define AUTH_MAX_MAIL_LEN 256
typedef enum {
AUTH_REQUEST_NONE, /* must not be requested */
typedef enum {
AUTH_RESULT_INTERNAL_FAILURE, /* never sent by imap-auth */
} AuthResult;
typedef enum {
AUTH_METHOD_PLAIN = 0x01,
AUTH_METHOD_DIGEST_MD5 = 0x02,
} AuthMethod;
/* Initialization reply, sent after client is connected */
typedef struct {
int auth_process; /* unique auth process identifier */
} AuthInitData;
/* New authentication request */
typedef struct {
int id; /* AuthReplyData.id will contain this value */
/* Continued authentication request */
typedef struct {
unsigned char cookie[AUTH_COOKIE_SIZE];
int id; /* AuthReplyData.id will contain this value */
/* unsigned char data[]; */
/* Reply to authentication */
typedef struct {
int id;
unsigned char cookie[AUTH_COOKIE_SIZE];
/* unsigned char data[]; */
/* Request data associated to cookie */
typedef struct {
int id;
unsigned char cookie[AUTH_COOKIE_SIZE];
/* Reply to cookie request */
typedef struct {
int id;
int success; /* FALSE if cookie wasn't found */
char home[AUTH_MAX_HOME_LEN];
char mail[AUTH_MAX_MAIL_LEN];
int chroot; /* chroot to home directory */
#endif