GSS_S_PROMPTING_NEEDED is a bit
[cyrus-sasl.git] / saslauthd / mechanisms.h
1 /* COPYRIGHT
2  * Copyright (c) 1997-2000 Messaging Direct Ltd.
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  * 1. Redistributions of source code must retain the above copyright
9  *    notice, this list of conditions and the following disclaimer.
10  * 2. Redistributions in binary form must reproduce the above copyright
11  *    notice, this list of conditions and the following disclaimer in the
12  *    documentation and/or other materials provided with the distribution.
13  *
14  * THIS SOFTWARE IS PROVIDED BY MESSAGING DIRECT LTD. ``AS IS'' AND ANY
15  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL MESSAGING DIRECT LTD. OR
18  * ITS EMPLOYEES OR AGENTS BE LIABLE FOR ANY DIRECT, INDIRECT,
19  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
20  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
21  * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
23  * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
24  * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
25  * DAMAGE.
26  * END COPYRIGHT */
27
28 #ifdef __GNUC__
29 #ident "$Id: mechanisms.h,v 1.10 2006/03/13 20:17:09 mel Exp $"
30 #endif
31
32 #ifndef _MECHANISMS_H
33 #define _MECHANISMS_H
34
35 #include "saslauthd.h"
36
37 /* PUBLIC DEPENDENCIES */
38 /* Authentication mechanism dispatch table definition */
39 typedef struct {
40     char *name;                         /* name of the mechanism */
41     int (*initialize)(void);            /* initialization function */
42     char *(*authenticate)(const char *, const char *,
43                           const char *, const char *); /* authentication
44                                                           function */
45 } authmech_t;
46
47 extern authmech_t mechanisms[];         /* array of supported auth mechs */
48 extern authmech_t *authmech;            /* auth mech daemon is using */
49 /* END PUBLIC DEPENDENCIES */
50
51 /*
52  * Figure out which optional drivers we support.
53  */
54 #ifndef AUTH_KRB5
55 # if defined(HAVE_KRB5_H) && defined(HAVE_GSSAPI)
56 #  define AUTH_KRB5
57 # endif
58 #endif
59
60 #ifndef AUTH_KRB4
61 # if defined(HAVE_KRB)
62 #  define AUTH_KRB4
63 # endif
64 #endif
65
66 #ifndef AUTH_DCE
67 # if defined(HAVE_USERSEC_H) && defined(HAVE_AUTHENTICATE)
68 #  define AUTH_DCE
69 # endif
70 #endif
71
72 #ifndef AUTH_SHADOW
73 # if defined(HAVE_GETSPNAM) || defined(HAVE_GETUSERPW)
74 #  define AUTH_SHADOW
75 # endif
76 #endif
77
78 #ifndef AUTH_SIA
79 # if defined(HAVE_SIA_VALIDATE_USER)
80 #  define AUTH_SIA
81 # endif
82 #endif
83
84 #ifndef AUTH_PAM
85 # ifdef HAVE_PAM
86 #  define AUTH_PAM
87 # endif
88 #endif
89
90 #ifndef AUTH_LDAP
91 # ifdef HAVE_LDAP
92 #  define AUTH_LDAP
93 # endif
94 #endif
95
96 #ifndef AUTH_HTTPFORM
97 # ifdef HAVE_HTTPFORM
98 #  define AUTH_HTTPFORM
99 # endif
100 #endif
101
102 #endif  /* _MECHANISMS_H */