summaryrefslogtreecommitdiffstats
path: root/imap/auth.h
blob: bf3f2c21cec11408df18ae01649acb46702cba03 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/*
 * Copyright (C) 2000 Brendan Cully <brendan@kublai.com>
 * 
 *     This program is free software; you can redistribute it and/or modify
 *     it under the terms of the GNU General Public License as published by
 *     the Free Software Foundation; either version 2 of the License, or
 *     (at your option) any later version.
 * 
 *     This program is distributed in the hope that it will be useful,
 *     but WITHOUT ANY WARRANTY; without even the implied warranty of
 *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *     GNU General Public License for more details.
 * 
 *     You should have received a copy of the GNU General Public License
 *     along with this program; if not, write to the Free Software
 *     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
 */ 

/* common defs for authenticators. A good place to set up a generic callback
 * system */

#ifndef _IMAP_AUTH_H
#define _IMAP_AUTH_H 1

typedef enum
{
  IMAP_AUTH_SUCCESS = 0,
  IMAP_AUTH_FAILURE,
  IMAP_AUTH_UNAVAIL
} imap_auth_res_t;

typedef imap_auth_res_t (*imap_auth_t)(IMAP_DATA* idata);

/* external authenticator prototypes */
imap_auth_res_t imap_auth_anon (IMAP_DATA* idata);
imap_auth_res_t imap_auth_cram_md5 (IMAP_DATA* idata);
imap_auth_res_t imap_auth_login (IMAP_DATA* idata);
#ifdef USE_GSS
imap_auth_res_t imap_auth_gss (IMAP_DATA* idata);
#endif
#ifdef USE_SASL
imap_auth_res_t imap_auth_sasl (IMAP_DATA* idata);
#endif

#endif /* _IMAP_AUTH_H */