static int get_username(void *context, int id, const char **result,
                        unsigned int *len);
static int get_password(sasl_conn_t *conn, void *context, int id,
                        sasl_secret_t **psecret);

static sasl_callback_t sasl_callbacks[] = {
{
  SASL_CB_USER, &get_username, NULL
}, {
  SASL_CB_AUTHNAME, &get_username, NULL
}, {
  SASL_CB_PASS, &get_password, NULL
}, {
  SASL_CB_LIST_END, NULL, NULL
}
};
