taskrambler  0.1.8
Web server and task management solution.
auth/auth.h
Go to the documentation of this file.
1 /**
2  * \file
3  * Container for authentication modules.
4  *
5  * This is a single point of authentication no matter how much
6  * authentication modules are in place. Thus it prevents adding
7  * more and more authentication modules to the application.
8  * This is an auth module itself but this one returns 0 if
9  * the authentication has failed otherwise the id of the
10  * successfull auth module. Thus we can identify by what method
11  * the user has been authenticated.
12  *
13  * This can't authenticate by its own. It has to be initialized
14  * with other auth modules by calling authCreate at least once.
15  *
16  * origin intend ... never implemented (but maybe a good idea)
17  *
18  * Authenticatio module factory
19  *
20  * A factory to get a specific authentication module.
21  * An authentication module is a class that implement the Auth interface.
22  *
23  * \author Georg Hopp
24  *
25  * \copyright
26  * Copyright © 2012 Georg Hopp
27  *
28  * This program is free software: you can redistribute it and/or modify
29  * it under the terms of the GNU General Public License as published by
30  * the Free Software Foundation, either version 3 of the License, or
31  * (at your option) any later version.
32  *
33  * This program is distributed in the hope that it will be useful,
34  * but WITHOUT ANY WARRANTY; without even the implied warranty of
35  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
36  * GNU General Public License for more details.
37  *
38  * You should have received a copy of the GNU General Public License
39  * along with this program. If not, see <http://www.gnu.org/licenses/>.
40  */
41 
42 #ifndef __AUTH_AUTH_H__
43 #define __AUTH_AUTH_H__
44 
45 #include "class.h"
46 #include "uuid.h"
47 #include "auth.h"
48 #include "auth/credential.h"
49 
50 
51 typedef enum e_AuthModule {
52  AUTH_LDAP = 1,
54 } AuthModule;
55 
56 #define MAX_AUTH AUTH_STORAGE
57 
58 CLASS(Auth) {
59  void * auth[MAX_AUTH + 1];
60 };
61 
62 int authCreate(Auth, AuthModule, ...);
63 
64 #endif // __AUTH_AUTH_H__
65 
66 // vim: set ts=4 sw=4:
int authCreate(Auth, AuthModule,...)
Definition: auth/create.c:33
CLASS(Auth)
Definition: auth/auth.h:58
#define MAX_AUTH
Definition: auth/auth.h:56
AuthModule
Definition: auth/auth.h:51