root/trunk/wifidog/src/auth.h

Revision 1373, 2.6 kB (checked in by wichert, 3 months ago)

Clean up compiler warnings

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1 /********************************************************************\
2  * This program is free software; you can redistribute it and/or    *
3  * modify it under the terms of the GNU General Public License as   *
4  * published by the Free Software Foundation; either version 2 of   *
5  * the License, or (at your option) any later version.              *
6  *                                                                  *
7  * This program is distributed in the hope that it will be useful,  *
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of   *
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    *
10  * GNU General Public License for more details.                     *
11  *                                                                  *
12  * You should have received a copy of the GNU General Public License*
13  * along with this program; if not, contact:                        *
14  *                                                                  *
15  * Free Software Foundation           Voice:  +1-617-542-5942       *
16  * 59 Temple Place - Suite 330        Fax:    +1-617-542-2652       *
17  * Boston, MA  02111-1307,  USA       gnu@gnu.org                   *
18  *                                                                  *
19 \********************************************************************/
20
21 /* $Id$ */
22 /** @file auth.h
23     @brief Authentication handling thread
24     @author Copyright (C) 2004 Alexandre Carmel-Veilleux <acv@miniguru.ca>
25 */
26
27 #ifndef _AUTH_H_
28 #define _AUTH_H_
29
30 #include "httpd.h"
31
32 /**
33  * @brief Authentication codes returned by auth server.
34  *
35  * Authentication result codes returned by auth_server_request() corresponding
36  * to result code from the central server itself.
37  */
38 typedef enum {
39     AUTH_ERROR = -1, /**< An error occured during the validation process*/
40     AUTH_DENIED = 0, /**< Client was denied by the auth server */
41     AUTH_ALLOWED = 1, /**< Client was granted access by the auth server */
42     AUTH_VALIDATION = 5, /**< A misnomer.  Client is in 15 min probation to validate his new account */
43     AUTH_VALIDATION_FAILED = 6, /**< Client had X minutes to validate account by email and didn't = too late */
44     AUTH_LOCKED = 254 /**< Account has been locked */
45 } t_authcode;
46
47 /**
48  * @brief This structure contains all the information returned by the  authentication server
49  */
50 typedef struct _t_authresponse {
51     t_authcode authcode; /**< Authentication code returned by the server */
52 } t_authresponse;
53
54
55 /** @brief Authenticate a single client against the central server */
56 void authenticate_client(request *);
57
58 /** @brief Periodically check if connections expired */
59 void thread_client_timeout_check(const void *arg);
60
61 #endif
Note: See TracBrowser for help on using the browser.