/* * Copyright © 2006 Atheme Development Group * Rights to this code are as documented in doc/LICENSE. * * Data structures for SASL plugin use. * * $Id: sasl.h,v 1.1 2007/07/19 08:24:50 pippijn Exp $ */ #ifndef SASL_H #define SASL_H struct sasl_mechanism_t; struct sasl_session_t { char uid[IDLEN]; char *buf, *p; int len, flags; sasl_mechanism_t *mechptr; void *mechdata; char *username; }; struct sasl_message_t { char *uid; char mode; char *buf; }; struct sasl_mechanism_t { char name[21]; int (*mech_start) (sasl_session_t *sptr, char **buffer, int *buflen); int (*mech_step) (sasl_session_t *sptr, char *message, int length, char **buffer, int *buflen); void (*mech_finish) (sasl_session_t *sptr); }; #define ASASL_FAIL 0 /* client supplied invalid credentials / screwed up their formatting */ #define ASASL_MORE 1 /* everything looks good so far, but we're not done yet */ #define ASASL_DONE 2 /* client successfully authenticated */ #define ASASL_MARKED_FOR_DELETION 1 /* see delete_stale() in saslserv/main.c */ #define ASASL_NEED_LOG 2 /* user auth success needs to be logged still */ #endif